home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.hackers
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!gagme!gagme!pv
- From: pv@gagme.chi.il.us (Paul Vader)
- Subject: Batch rn
- Message-ID: <1993Jan24.220603.18068@gagme.chi.il.us>
- Originator: pv@gagme
- Lines: 48
- Sender: pv@gagme.chi.il.us (Paul Vader)
- Organization: Inline Software Creations
- Date: Sun, 24 Jan 1993 22:06:03 GMT
- Approved: That remains to be seen
-
- Rob J. Nauta Writes:
- >You GOT to be kidding... If you want to automatically save articles, use
- >'readnews'. It comes with Bnews. it's old, slow, primitive, but for this it
- >works.
-
- There's one good reason to use rn instead, and it's a biggie. KILL FILES. If
- you run rn in batch, you can build big and complex kill files, and not have
- to wait for them to execute online. That said, try this script to run rn in
- batch (I haven't used it in quite some time, so it might not be quite right.
- My sysadmin developed a batch set of newsreading tools at my suggestion a
- year ago when he wanted to practice nntp programming, but that's another
- story):
-
- echo "Starting news extraction process..."
- echo "z %(%m=n?=: )">batchrn
- TERM=dumb
- RNINIT='-s -T -t'
- RNMACRO=$PWD/batchrn
- export RNMACRO RNINIT TERM
- yes 'z' | rn > newsfile
- echo "News File creation completed. Cleaning up..."
- rm batchrn
- echo "Done."
-
- This has a few problems:
- 1. If you run out of space while the extraction is running, It just stops
- dead. Cleaning up your .newsrc can be messy. Your're best off immediately
- copying .oldnewsrc to .newsrc and starting over someplace else with more
- space.
- 2. For some reason I wanted to see indexes before the messages. You might
- want to take this out of the macro, but I'm leaving it as an exercise
- for the Reader because I don't remember the syntax.
- 3. I could never quite get it to work under cron. I use "at" instead, and
- imbed an at command at the end of the script to reschedule for the next
- day (If you do this, add a date to the newsfile filename).
- 4. You see everything that happens in the session, because it's just
- pressing the spacebar (except at the newsgroup selection prompt, where it
- types "="). This leads to some ugliness in the extract, especially the
- "---More---" prompt right after the header.
- 5. It's almost as exciting to watch as grass growing, and chews CPU like
- calculating the millionth digit of pi.
-
- Enjoy! PV
-
- P.S. Enough with the IP ports already! Try "more /etc/services" or RTFM.
- --
- Paul Vader systems analyst, hell's cavenewt, rollerblader,
- pv@gagme.chi.il.us FOAF, smartass liberal democrat
-