🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #10755

Re: looking for batch reader

#10755
From: Martin J. Dellwo
Date: Thu, 11 Aug 1994 14:22
62 lines
3382 bytes
In article <94Aug8.114814edt.8575@wotan.ai.toronto.edu>,
Bryan M Kramer <kramer@cs.toronto.edu> wrote:
>Does there exist a program that will run as a batch process to pick up
>news matching certain specifications (e.g. regexp match on subject
>line), store these articles in a file, and update the .newsrc? It

You can do this by running trn and having appropriate 'KILL' files set
up for the newsgroups you're interested in.  I have this lying around,
Wayne sent it in, in response to a similar query.

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
#!/bin/sh
# trnkill - shell script to apply trn KILL files in the background
# 14 Mar 89  created for rn by Jim Olsen <olsen@XN.LL.MIT.EDU>
# 10 Sep 93  modified for trn 3 (or 2) by Wayne Davison <davison@borland.com>
# Options: -d	debug mode -- you see all gory action as it happens.

# Visit all newsgroups (if trn asks about anything else, just say no)
export TRNINIT TRNMACRO RNMACRO
TRNINIT='-q -s -T -t -x +X'
TRNMACRO=/tmp/trnkill$$
# support for trn 2.x
RNMACRO=$TRNMACRO
trap 'rm -f $TRNMACRO; exit' 1 2 3 15
echo "z %(%m=[nf]?.q^M:n)^(z^)" > $TRNMACRO
echo "^m ^(z^)" >> $TRNMACRO
echo "^j ^(z^)" >> $TRNMACRO
if test X$1 = X-d; then
	echo "z" | trn
else
	echo "z" | trn >/dev/null 2>&1
fi
rm -f $TRNMACRO
exit 0
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---

I suggest the following modification, if you wish to have a different
set of Killfiles/directories for batch jobs (as opposed to when you're
actually reading):  Change TRNINIT to be a file, such as
~/News/.trnbatinit.  You could move the macro commands to a file as
well...(in fact, the above script would be much shorter).  I tried
this with these setting in the file: 
---------.trnbatinit------------
-s -q -K -T +z -f -a -N
-pp -Zot
-EDOTDIR="~/News"
-ESAVEDIR="%p/BatchSave"
-ESAVEFILE="%^C"
-EKILLLOCAL="%p/KillBatch/%C"
-EKILLGLOBAL="%p/KillBatch/Global"
--------------------------
Then you put your special Killfiles in, for example, the file
%p/KillBatch/news.software.readers, or a default file 'Global'.  The
saved files would all get dumped into a single file per group, in
directory %p/BatchSave.  You can read what the flags mean in the man
page, they're not all necessary, and differ from the ones in the
script above.

-- 
Martin J. Dellwo   (610) 983-7396   mdellwo@Kodak.COM
Biophysics and Computational Chemistry
Sterling Winthrop Pharmaceuticals Research Division
Technical Details
Message-ID: <32dc6f$nhf@kodak.rdcs.Kodak.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!bga.com!news.sprintlink.net!primenet!netnews.asu.edu !asuvax!gatech!news-feed-1.peachnet.edu!news.duke.edu!MathWorks.Com!news2.near.net!usenet.elf.com!rpi!newsserver.pixel.kodak.com!newsserver.rdcs.Kodak.COM!r06a661
References: <94Aug8.114814edt.8575@wotan.ai.toronto.edu>

Show Full Headers
Complete Article Headers
Message-ID: <32dc6f$nhf@kodak.rdcs.Kodak.COM>
Subject: Re: looking for batch reader
Date: Thu, 11 Aug 1994 14:22:07 +0000
From: r06a661@bcc26.kodak.com (Martin J. Dellwo)
References: <94Aug8.114814edt.8575@wotan.ai.toronto.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!bga.com!news.sprintlink.net!primenet!netnews.asu.edu  !asuvax!gatech!news-feed-1.peachnet.edu!news.duke.edu!MathWorks.Com!news2.near.net!usenet.elf.com!rpi!newsserver.pixel.kodak.com!newsserver.rdcs.Kodak.COM!r06a661
Newsgroups: news.software.readers
Organization: Sterling Winthrop Pharmaceuticals Research Division
Lines: 62
Reply-To: mdellwo@Kodak.COM
NNTP-Posting-Host: bcc26.kodak.com