🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
2 messages
2 total messages Started by Bryan M Kramer Mon, 08 Aug 1994 15:48
looking for batch reader
#10726
Author: Bryan M Kramer
Date: Mon, 08 Aug 1994 15:48
15 lines
1488 bytes
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
would be nice to run this from cron, for example, to guarantee receipt
of news when I can't read it every day and I want to make sure I see
certain things before they are deleted.

The perl program "aub" for retrieving image files could probably be
hacked to do what I want, but I haven't had the time to dive into it
and understand it enough to modify it.

|Bryan M. Kramer, Ph.D.	      416-978-7569, fax 416-978-1455|
|Department of Computer Science, University of Toronto      |
|6 King's College Road, Room 265A			    |
|Toronto, Ontario, Canada      M5S 1A4                      |
Re: looking for batch reader
#10755
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads