Article View: news.software.readers
Article #7529Re: [Q] Which newsreader will do THIS:
From: Adri Verhoef
Date: Wed, 26 Jan 1994 11:55
Date: Wed, 26 Jan 1994 11:55
73 lines
2730 bytes
2730 bytes
Subject: Automagically downloading articles via rn
Keywords: rn, UNIX
You want something like this:
% auto-rn this.news.group
The following scripts will help you.
----- cut here ------ BEGIN ----- auto-rn
:
#ident "@(#)auto-rn 1.0 (a3) 15 aug 1992"
if [ $# != 1 ]
then
echo "$0: No newsgroup specified."
exit 1
fi
# If there are no unread articles, rn returns 0 exit status, else 1.
if rn -csq $1
then
echo "No news in group $1."
else
echo "Extracting news from group $1."
KILLGLOBAL=%p/AUTO-RN-KILL rn -M -q -T $1 <<eof
yqq
eof
fi
----- cut here ------ END ----- auto-rn
In the file 'News/AUTO-RN-KILL' (if %p = $HOME/News) you put the following:
----- cut here ------ BEGIN ----- News/AUTO-RN-KILL
/^/s %C:j
----- cut here ------ END ------- News/AUTO-RN-KILL
In this way, articles will be saved in directory $HOME/News, and the
name of the saved file will be that of the newsgroup (%C).
How does 'auto-rn' work?
1) It checks the newsgroup if there are any articles (work to do).
2) It starts 'rn' to read and save the specified newsgroup.
3) It saves each unread article of that newsgroup into the savefile.
4) It marks all read articles as "read" by "junking" each one.
5) It doesn't enter more than one newsgroup per run.
$HOME/News/AUTO-RN-KILL is in fact a rn "KILL" file.
rn -c : check for unread articles
rn -s : suppress initial listing of newsgroups
rn -q : suppress checking for new newsgroups
rn -M : save articles in mailbox format
rn -T : allow typeahead (i.c. "yqq")
Don't reformat the strings "yqq" and "eof" in the 'auto-rn' script.
"yqq" : 'y' for "yes, read this newsgroup"
'q' for "quit this newsgroup at the 'End of group...' prompt"
'q' to leave rn
Note that the following environment variable may come in handy for long
'Path:' headers:
MBOXSAVER=%X/mbox.saver %A %P %c %a %B %C "%b" "From X %`date -u`"
(sh-syntax)
Adri
Technical Details
Message-ID:
<CK8Jrs.Bvv@rivm.nl>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!gmd.de!xlink.net!rz.uni-karlsruhe.de!news.uni-ulm.de!zib-berlin.de!math.fu-berlin.de!oldnews2.cis.umn.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!EU.net!sun4nl!rivm!a3References:
<pigdogCK8A85.6o3@netcom.com>Show Full Headers
Complete Article Headers
Message-ID: <CK8Jrs.Bvv@rivm.nl> Subject: Re: [Q] Which newsreader will do THIS: Date: Wed, 26 Jan 1994 11:55:03 GMT From: a3@rivm.nl (Adri Verhoef) References: <pigdogCK8A85.6o3@netcom.com> 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!gmd.de!xlink.net!rz.uni-karlsruhe.de!news.uni-ulm.de!zib-berlin.de!math.fu-berlin.de!oldnews2.cis.umn.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!EU.net!sun4nl!rivm!a3 Newsgroups: news.software.readers Sender: news@rivm.nl Organization: Rijksinstituut voor Volksgezondheid en Milieuhygiene,Bilthoven,NL Lines: 73