Thread View: news.software.readers
4 messages
4 total messages
Started by John Durso
Fri, 10 Sep 1993 20:27
trn all articles with subj
Author: John Durso
Date: Fri, 10 Sep 1993 20:27
Date: Fri, 10 Sep 1993 20:27
69 lines
2843 bytes
2843 bytes
>> Is there a way to get TRN (v2.5) to go to a specific usenet conference >> and get all articles with a specified word in the subj line and >> save them (appending) to a file? > >However, this requires that you run trn and enter the group to get it to >work. If you want this to happen automatically you can use the following >script that tells trn to enter each group in your .newsrc, which in turn >runs each group's kill file: > >#!/bin/sh ># trnkill - shell script to apply trn KILL files in the background ># 14 Mar 89 created 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 >if test X$1 = X-d; then > echo "z" | trn >else > echo "z" | trn >/dev/null 2>&1 >fi >rm -f $TRNMACRO >exit 0 Wayne, Thanks, However, will the above macro run on all newsgruops I've selected in my .newsrc, or just one newsgroup. What I want to do is save all articles with a certain word in the subject line of 1 Newsgroup. Otherwise, I'd like it to treat everything else like nothing happened. In other words, I want to be able to occasionally log on to trn, and read all my newsgroups in an interactive mode. However, if the above macro erases all the messages, in all the groups then I would not be able to read them. What I specifically want to do is be able to run a cron job or something at a specific time every few days and save the articles with a specific set of words in the subject line to a file, and then set those articles as read (so they won't get saved again). I'd like to keep everything else as unread, so that I'll have the chance to read them interactively in the future when I run trn. Thanks John -- John <durso@bronze.lcs.mit.edu>
Re: trn all articles with subj
Author: Wayne Davison
Date: Fri, 10 Sep 1993 22:11
Date: Fri, 10 Sep 1993 22:11
53 lines
2634 bytes
2634 bytes
According to John Durso <durso@bronze.lcs.mit.edu>: > Thanks, However, will the above macro run on all newsgruops > I've selected in my .newsrc, or just one newsgroup. The previously mentioned macro enters all groups and immediately quits, which only serves to run whatever kill file you have enabled for that group. If you want to limit this you could change the command in the script to run on only one group, i.e.: echo "z" | trn news.software.readers >/dev/null 2>&1 This isn't actually required since having your individual commands in each group's kill file limits their scope. This way you could even have search commands that search the entire article in various kill files and have the work done without you having to sit through it. > However, if the above macro erases all the messages, in all the groups > then I would not be able to read them. It shouldn't erase any messages unless you have kill commands in your kill files. I did just notice that in certain circumstances the newline generated by the echo "z" can cause problems (like if there is a new "newsnews" file the macro gets mixed up) so I would recommend using the following script instead of the one previously posted: #!/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 -- Wayne Davison davison@borland.com
Re: trn all articles with subj
Author: John Durso
Date: Sat, 11 Sep 1993 04:58
Date: Sat, 11 Sep 1993 04:58
53 lines
1598 bytes
1598 bytes
>The previously mentioned macro enters all groups and immediately quits, >which only serves to run whatever kill file you have enabled for that >This isn't actually required since having your individual commands in >each group's kill file limits their scope. This way you could even have >search commands that search the entire article in various kill files and >have the work done without you having to sit through it. > >It shouldn't erase any messages unless you have kill commands in your >kill files. > Wayne, thanks alot. The system here doesn't have the man pages for trn (at least nothing registers when I do a man trn), so the question I now have is What's a Kill file? PS, are the man pages for trn avail at a site for ftp DLing? (ver 2.5) John -- John <durso@bronze.lcs.mit.edu>
Re: trn all articles with subj
Author: Jon Bell
Date: Sat, 11 Sep 1993 15:31
Date: Sat, 11 Sep 1993 15:31
17 lines
1470 bytes
1470 bytes
In article <26rlsv$71d@bronze.lcs.mit.edu>, John Durso <durso@bronze.lcs.mit.edu> wrote: > >PS, are the man pages for trn avail at a site for ftp DLing? >(ver 2.5) You can ftp the trn 2.5 man pages in various formats from cs1.presby.edu, directory pub/trn-intro. Since we don't have *roff, I formatted them by hand from the sources that came with trn. They're intended for printing on a Mac or PC, not for on-line display. I'm working on the 3.3 man pages, but it will be a week or two yet before they're ready. (No, I never did 3.0, 3.1 or 3.2, because the upgrades followed one another so quickly...) -- Jon Bell <jtbell@presby.edu> Presbyterian College Dept. of Physics and Computer Science Clinton, South Carolina USA
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