Thread View: news.software.readers
2 messages
2 total messages
Started by lvirden
Sat, 22 Oct 1994 03:47
Needed: a trn/strn/rn Kill file _CODE_ expert
Author: lvirden
Date: Sat, 22 Oct 1994 03:47
Date: Sat, 22 Oct 1994 03:47
37 lines
2046 bytes
2046 bytes
I have tried - honestly I have. And I suppose, if I were to work in all my spare time, every week for the next few months, I might be able to eventually figure this out. But I would rather see if there were a quick solution to this proposition. Currently, at least trn and probably the others above have the ability within the KILL file to indicate that an article matching a regular expression should be piped into a program. What I would like to ask for is one slight modification. I would like for the _return code_ of the program on the end of the pipe to determine whether an article was marked as selected, junked or left alone. I am perfectly willing to live with a new symbol in this case - perhaps a } or something. What I want to do is be able to say things like: /nonsense/}mycheck and then have mycheck be something like: #! /bin/sh grep -s 'morestuff' >> /dev/null return $? so that now I can do operations on the newsarticle, and have the return code determine whether the item deserves to be selected or not. -- :s Great net resources sought... :s Larry W. Virden INET: lvirden@cas.org :s <URL:http://www.mps.ohio-state.edu/cgi-bin/hpp?lvirden_sig.html> The task of an educator should be to irrigate the desert not clear the forest.
Re: Needed: a trn/strn/rn Kill file _CODE_ expert
Author: Tom Christiansen
Date: Mon, 07 Nov 1994 13:26
Date: Mon, 07 Nov 1994 13:26
34 lines
2270 bytes
2270 bytes
:-> In news.software.readers, davison@borland.com (Wayne Davison) writes: :According to <lvirden@cas.org>: :> What I would like to ask for is one slight modification. I would like for :> the _return code_ of the program on the end of the pipe to determine whether :> an article was marked as selected, junked or left alone. : :Here's something that should help you out: : : /subject search/:%(%`fgrep -c trn %A`=^0?-:+) : Very nice, although it keeps reminding how Larry Wall must at some point in his life been held tortured by some headhunter whose first language was teco. :-) On the other hand, this has got to be pretty slow, what with an exec for each article. How's strn coming along? Haven't looked at it for a long time. Is it tracking trn? Is it still being updated, maintained, etc? I'd like to be able to farm out the potential articles to an external selector to do smart analysis on them, like the clip program does. I tend to feel that this needs to be done at a granularity greater than one exec per article. I know there was some strn support for Brad Templeton's newsclip system, but I'd love to make my own, given a reasonable API. Anyone have any luck with this? thanks, --tom -- Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com "Patriotism is the virtue of the vicious." - Oscar Wilde
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