ó V Qc@sâddlZddlZddlZddlZddlZejjdƒZdZdZ dZ eZ dZ dZ dZd Zd ZxXejejd fD]@Zejjed ƒZejjeƒr›eGHeeƒPq›q›Wdd lmZddlTdZdjed„ejƒƒƒZiaejjee ƒZ ejjee ƒZ ejjee ƒZd„Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%d„Z&d„Z'd„Z(d„Z)e*dkrÞe)ƒndS(iÿÿÿÿNs ~/newspagesnews.example.comt grouptreet newsgroupsttrootis;... itHOMEs.newslistrc.py(tNNTP(t*s $Revision$t cCs d|kS(Nt$((ts((s-/usr/lib64/python2.7/Demo/scripts/newslist.pytmscCs6dGHx*|D]"}|jdƒ}t||ƒq WdS(NsUpdating tree...t.(tsplittmakeleaf(ttreetgroupstitparts((s-/usr/lib64/python2.7/Demo/scripts/newslist.pyt addtotreexs cCst|d}t|ƒ}||kr/i|| s&Newsgroups available%s s s

Newsgroups available%s

s-Back to top level

is

s7This page automatically created by 'newslist' v. %s.s s ( tosRtjointpagedirtrootpagetopentwritethttppreft printtreetrcsrevttimetctime(RRtptfilenametdetailtf((s-/usr/lib64/python2.7/Demo/scripts/newslist.pyt createpages"         cCs”t|ƒ}|tkr}|dkr}|jdt|dfƒ|j|ddƒ|jdtƒt|d||ƒdS|jƒ}|dkrÝ|jƒ|dkrÃ|jd|dƒn |jdƒ|d}nx”|D]Œ}|dkrQ|jd |d|dfƒ|dtkrA|jd t|dƒqp|jd ƒqät |||||d|ƒqäW|dkr|jd ƒndS( Nis

  • is.*s %s s
  • %s
      s
        R s
      • %s s %s s s
      ( Rt sublistsizeRRt pagelinkiconR'tkeystsorttdescR(R&RtindentR#RtklR((s-/usr/lib64/python2.7/Demo/scripts/newslist.pyR¨s.         # c CsÊia|dkrdSy’t|dƒ}}dGHxn|D]f}|jƒ}y@|d}dj|dƒ}t|ƒdkrˆ|t|RtmarshaltloadR1(ttreefileRttreetimettreedatetdump((s-/usr/lib64/python2.7/Demo/scripts/newslist.pyt readlocallistüs   #  cCs`y7t|dƒ}tj||ƒ}WdQXd|GHWn"dG|GHdGHtjdƒnXdS(NtwbsSaved list to %s s,Sorry - failed to write to local group caches8Does it (or its directory) have the correct permissions?i(RRDRIR:R>(RFRRIR((s-/usr/lib64/python2.7/Demo/scripts/newslist.pytwritelocallists  cCs®dGHd}|jƒd}g}dGHtr4dGHnx`|D]X}|djƒd}tr†t|dƒt|dƒkr†|dGq;|j|ƒq;Wd GHtrªd GHn|S( NsGetting list of all groups...t010101is Processing...s! Ignoring following empty groups:iiRs s(End of empty groups)(tlistt skipemptyR tinttappend(tserverRHtinfoRRtgrpname((s-/usr/lib64/python2.7/Demo/scripts/newslist.pyt getallgroupss  & cCsnd|G|j|dƒd}dt|ƒGHdGg}x+|D]#}|jƒd}|j|ƒq>WdGH|S(Ns/Getting list of new groups since start of %s...t000001isgot %d.s Processing...itDone(t newgroupsRR RQ(RRRHRSRRRT((s-/usr/lib64/python2.7/Demo/scripts/newslist.pyt getnewgroups/s cCs<i}ttƒyDdtGHtjddkrAtjtƒ}n ttƒ}t}Wn3tj tj fk r‰}dG|GHdGHt }nX|rÇt tj ƒdkrÇtj ddkrÇt|ƒ}n*ttƒ\}}|rñt||ƒ}n|rt||ƒtt|ƒnttƒdGHtt|d ƒd GHdS( NsConnecting to %s...it0sError connecting to host:s$I'll try to use just the local list.is-asCreating pages...RRW(R?RtnewshostR:tversionRtinittTruetnntplibt error_tempt error_permtFalseRtargvRURJRFRYRRLR7R2R'R(RR t connectedtxRRH((s-/usr/lib64/python2.7/Demo/scripts/newslist.pytmain=s0      .  t__main__(+R:R_RDR!RRt expanduserttopdirR[RFR2RRRROR)R(tcurdirtenvirontdirRtrcfiletexiststexecfileRRBR tfilterR R,tpageRR R'RR7R?RJRLRURYRft__name__(((s-/usr/lib64/python2.7/Demo/scripts/newslist.pyt#sJ<   !    *      )