Article View: news.software.readers
Article #12880Maybe trn? (was: Looking for tool to clean up newsrc file
From: Peter Kappesser
Date: Thu, 17 Nov 1994 10:02
Date: Thu, 17 Nov 1994 10:02
42 lines
3009 bytes
3009 bytes
Recently in news.software.readers, lvirden@cas.org wrote: > >Specs: >4. What I do want is something that will wander thru my newsrc file and >trim lines I currently have unsubscribed (and the subscribed ones as well >perhaps) to reflect the current state of the articles within the NNTP >server / active file. > > >for i in lines of newsrc > break up line of text , look to see what the lowest article is, set > first entry to (either 0 or 1, depending on how things are > set currently) thru lowest-1, then, for each of the remaining > articles listed, check to see if it is present, and if not, > add the number to the list of 'read' articles. Collapse > numbers where possible into ranges. > >Anyone have such a critter? What I would _really_ wish for is the above >functionality added to eep - but that's probably too much to hope for. Doesn't trn do this as part of its operation? I just did a cursory check, shelling out of trn and comparing the ranges listed in some unsubscribed newsgroups in my .newsrc with those listed in my /tmp/rrnact.* file, and it seemed there were no "stale" articles in the .newsrc. However, this isn't certain, because the news server here has a cluster of unexpired articles from January still hanging around in some newsgroups. So, if you're not using trn to read news, you could use the trnkill script (see the FAQ [** SHAMELESS PLUG **]) to do this. If your main goal is to trim the size of your .newsrc, I've found it effective to just get rid of all the unsubscribed groups (the easy way: cp .newsrc .newsbak ; grep ":" .newsbak > .newsrc ) and run trn with the -q option. (Luckily the news admin here posts the newgroup messages on a local newsgroup, so I just check that to find out what's new. Otherwise you could search for newgroup messages in control.) My .newsrc is about 9K as a result. The only disadvantage I've seen so far is when I subscribe to a (previously) completely unsubscribed newsgroup, I may see some crossposted articles I'd seen before. Big deal. -- pjkappes@mailbox.syr.edu (Peter Kappesser)
Technical Details
Message-ID:
<3af9ng$ec6@newstand.syr.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!princeton!rutgers!dziuxsolim.rutgers.edu!uunet!bloom-beacon.mit.edu!news.kei.com!travelers.mail.cornell.edu!newstand.syr.edu!hydra.syr.edu!pjkappesReferences:
<1994Nov15.190054.28819@chemabs.uucp>Show Full Headers
Complete Article Headers
Message-ID: <3af9ng$ec6@newstand.syr.edu> Subject: Maybe trn? (was: Looking for tool to clean up newsrc file Date: Thu, 17 Nov 1994 10:02:24 +0000 From: pjkappes@hydra.syr.edu (Peter Kappesser) References: <1994Nov15.190054.28819@chemabs.uucp> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!princeton!rutgers!dziuxsolim.rutgers.edu!uunet!bloom-beacon.mit.edu!news.kei.com!travelers.mail.cornell.edu!newstand.syr.edu!hydra.syr.edu!pjkappes Newsgroups: news.software.readers Organization: Not Quite Syracuse University, Syracuse, NY Lines: 42 Reply-To: pjkappes@mailbox.syr.edu NNTP-Posting-Host: hydra.syr.edu X-ORIGINAL-NEWSGROUPS: news.software.readers,comp.lang.perl