🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by Christopher Davis Wed, 21 Aug 1991 22:18
Perl Newsreader Design (was Re: Wanted: C-News log report generator)
#518
Author: Christopher Davis
Date: Wed, 21 Aug 1991 22:18
54 lines
3100 bytes
[Followups to news.software.readers and/or comp.lang.perl; the
discussion's on how to integrate perl code into a KILL file, so it's
germane to both.  Moving out of news.software.b.]

 Tom> == Tom Christiansen <tchrist@convex.COM> 

 ckd> I *know* I'd like a newsreader that allowed 'eval' in a kill file.

 Tom> Tell me how you'd like to see this work.  I don't see how
 Tom> to avoid giving plum (a program of mine) a newsreading mode. 

Well, that depends on whether or not we're looking for backward
compatibility.  It shouldn't be too hard to write a 'rn2plum' in perl to
convert the syntax, so I'll assume we don't care if rn-style KILL file
syntax is compatible.

GNUS does pretty well with a sort of "power-steering" elisp for KILL
files; it allows you to hit a few keys to insert a "kill this subject"
or "kill this author" command, which you can always edit to be more (or
less) stringent.

Example:  I hit ESC k to get a buffer news.software.b.KILL, then C-c C-k
C-a to "command kill author", and it inserts:
(gnus-kill "From" "tchrist@convex\\.COM (Tom Christiansen)")

It even nicely regexpifies the name, as you can see.

I'd like to see something like:

$HOME/News/comp.lang.perl.FILTER:
----------------
require 'ckdextensions.pl';
&ckd'archive if $header{'From'} =~ /^tchrist@.*convex\.com/i;
&kill if $header{'Subject'} =~ /MODERATOR ABUSE!!!/;
&ckd'mail-to-friend('dave@somevax.big-u.edu') if
             (length($header{'References'}) > 50);
&ckd'unshar('/usr/local/lib/perl/usenet')
            if ($header{'Keywords'} =~ /\bshar\b/);
----------------

with some easy way of generating simple "kill if from" and "kill if
subject match" without having to hand-write it, but I really want full
perl in there.

I don't think KILL files are still the right name, which is why I
suggested FILTER instead...

--Chris
-- 
Christopher Davis <ckd@eff.org>   | ELECTRONIC MAIL WORDS OF WISDOM #5:
System Manager & Postmaster       |     "Internet mail headers are
Electronic Frontier Foundation    |        not unlike giblets."
+1 617 864 0665    NIC: [CKD1]    |  -- Brian Reid <reid@decwrl.dec.com>
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