Xref: utzoo gnu.emacs.gnus:1054 news.software.b:6629 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dali.cs.montana.edu!ogicse!pdxgate!qiclab!m2xenix!quagga!proxima!undeed!barrett From: barrett@Daisy.EE.UND.AC.ZA (Alan P. Barrett) Newsgroups: gnu.emacs.gnus,news.software.b Subject: Re: .newsrc sorter/reorderer Message-ID: <1991Jan14.124522.28985@Daisy.EE.UND.AC.ZA> Date: 14 Jan 91 12:45:22 GMT References: Organization: Univ. Natal, Durban, S. Africa Lines: 61 In article , 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 , 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