pst+@ir.Stanford.EDU (Paul Traina) (01/11/91)
I'm looking for a simple hook or function to tidy up my .newsrc (and the .el file, but that is _less_ important) and reorder it according to a presentation sequence (similar to nn). What I'd like to do is feed input like: comp.security.announce news.announce.important comp.protocols comp.unix alt.sex.bestiality rec.humor.funny news comp alt rec OTHER clari bit Into a program/function/whatever and have it reorder my .newsrc file to follow those conventions. (with any news heirarchy not explicitly mentioned showing up in alphabetical order at the OTHER position). Has anyone done something interesting like this? (I've already looked at the way rn's newsetup does things, I wasn't completely impressed.)
barrett@Daisy.EE.UND.AC.ZA (Alan P. Barrett) (01/14/91)
In article <PST+.91Jan10184738@ack.Stanford.EDU>, pst+@ir.Stanford.EDU (Paul Traina) writes: > I'm looking for a simple hook or function to tidy up my .newsrc (and > the .el file, but that is _less_ important) and reorder it according > to a presentation sequence (similar to nn). I posted my sort-newsrc script to news.software.b,news.software.nn and comp.lang.perl a few weeks ago. Here is some of the blurb that I wrote last time: -------- If you use nn and also another newsreader (I use both nn and trn) then you may wish for a way of sorting your .newsrc file so that the other newsreader uses approximately the same presentation sequence as nn does. Here is a script that sorts a .newsrc file into the order specified by a .nn/init file. It works OK with my .newsrc and my .nn/init files; your mileage may vary. Even if you don't use nn, you might find this script useful; just fake up a .nn/init file for it. I hope that the summary included in the source is sufficient to enable you to do this. --------- and here is the documentation from the top of the script itself: --------- #!/usr/bin/perl # Sort a .newsrc file, according to sequence information like that # used by nn. # A. P. Barrett <barrett@ee.und.ac.za>, December 1990. # Inputs: # 1. The old .newsrc file. Presented on stdin. # 2. A .nn/init file, or reasonable facsimilie thereof. Named # as a command line argument, or defaulted to $HOME/.nn/init # if that exists. # # Output: # A new .newsrc file. Sent to stdout. # # Action: # The .newsrc file is sorted according to the sequence information # in the .nn/init file. This will not necessarily be identical to the # order used by nn, because we do not read the global nn/init file, and # we make no attempt to deal with non-vanilla features of nninit files # or newsrc files. # # Format of nninit file: # The format is actually more complicated; this script supports only the # following subset. [deleted --apb] --------- Hope this helps. --apb Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa Internet: barrett@ee.und.ac.za (or %ee.und.ac.za@saqqara.cis.ohio-state.edu) UUCP: m2xenix!quagga!undeed!barrett PSI-Mail: PSI%(6550)13601353::BARRETT