🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #518

Perl Newsreader Design (was Re: Wanted: C-News log report generator)

#518
From: 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>
Technical Details
Message-ID: <CKD.91Aug21181853@eff.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.lang.perl.mbox.zip!gmdzi!unido!mcsun!uunet!world!eff!ckd
References: <1991Aug20.175013.7203@zoo.toronto.edu> <1991Aug20.204527.6270@netlabs.com> <CKD.91Aug20223001@eff.org> <1991Aug21.040020.27341@convex.com>

Show Full Headers
Complete Article Headers
Message-ID: <CKD.91Aug21181853@eff.org>
Subject: Perl Newsreader Design (was Re: Wanted: C-News log report generator)
Date: Wed, 21 Aug 1991 22:18:58 +0000
From: ckd@eff.org (Christopher Davis)
References: <1991Aug20.175013.7203@zoo.toronto.edu> <1991Aug20.204527.6270@netlabs.com> <CKD.91Aug20223001@eff.org> <1991Aug21.040020.27341@convex.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.lang.perl.mbox.zip!gmdzi!unido!mcsun!uunet!world!eff!ckd
Newsgroups: news.software.b,comp.lang.perl,news.software.readers
Sender: ckd@eff.org (Christopher Davis)
Followup-To: news.software.readers,comp.lang.perl
Organization: The Electronic Frontier Foundation
Lines: 53
In-Reply-To: tchrist@convex.COM's message of 21 Aug 91 04:00:20 GMT