🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #184736

Re: [SLRN] Favorite scorefile entries, was Re: X-Privat, was...

#184736
From: Alan Connor
Date: Wed, 10 May 2006 21:21
121 lines
5451 bytes
On news.software.readers, in <20060510215148@usenet.piggo.com>,
"Troy Piggins" wrote:

> * Alan Connor wrote:
>
>> On news.software.readers, "Michael DeBusk" wrote:
>>
>> Read your other, concurrent, article. Excellent. I'm sure you
>> are right about how slrn deals with the "Lines:" header.
>>
>> You wouldn't have to add a Lines header with a
>> macro/script. Any header would do:
>>
>> X-Troll: yes
>>
>> Procmail is very useful for post-download filtering,
>> by-the-way.
>>
>> You have to use formail or sed to remove the From Date
>> header (Not "From:") before sending them back to your local
>> cache. Otherwise it is just like filtering mail. Egrep instead
>> of slrn's weird regexes.
>
> G'day again Alan. 

Likewise, Troy. (read your response on cmm)

> I've been trying to get this working in a
> script but keep stalling on its development.
>
> What I want is a way to parse all downloaded articles through
> procmail just after slrnpull fetches them.  You got something
> along those linesworking?

I _did_. Can't find the script! (what I was doing the
post-download processing for turned out to be a waste of time)

Found bits and pieces though :-/

This gets a list of the active directories from your
slrnpull.conf (/boot/SLRNPULL/ is my $SLRNPULL_ROOT)

sed -ne 's:\.:/:g' -ne 's:^\([a-z0-9-][a-z0-9-]*/[a-z0-9-][a-z0-9-]*[^ ][^ ]*\)\(  .*$\):\1:p' /boot/SLRNPULL/slrnpull.conf | sed 's:.*:/boot/SLRNPULL/news/&:'

You have to send all the posts from your spool through procmail
to a temp dir and then mv them back to your spool.

for dir in ...
do

for file in ...
do  

done

done

(be aware that some of the stuff showing up in your menu is
from the .overview, not the actual headers, until you open
the post...)

Sorry, Piggo. Just not into re-writing it at the moment. Fairly
complex script.

For some purposes, it would be cleaner to use an ed script to
parse/edit the files/posts in place. Ed will do that while sed
requires a temp file, as does procmail in this case.

See the ed dir on my website for scripting info.

> [snip]

>> [*]
>> Score:: -600 %my killscore is -500
>> Xref: advocacy
>> Xref: microsoft  % I don't subscribe to any
>                    ^^^^^^^^^^^^^^^^^^^^^^^^^^

> Be careful of this one.  I once had comments in the middle of
> scoring rules and it fouled up the next few rules.  IIRC the
> only comment within a score rule should be the one on the same
> line as Score which is the comment you see when you hit 'v' (by
> default) to see what score rules are applying to a particular
> article.

Thanks! There's nothing like that in my actual scorefile, and
now there won't ever be :-) 

So I shouldn't post such things here, obviously.

>
> [snip]
>
>> Do you have _any_ idea how to score for non-us-ascii
>> characters in the headers, Michael?
>
> I don't do it so no idea if this would work, but what about
> something along the lines of:
>
>

> I don't do it so no idea if this would work, but what about
> something along the lines of:
>

> Score: -9999
> Subject: [^a-zA-Z0-9,.:-]+
>

> Not sure how advanced REs are for s-lang, but the idea was to
> grep for Subject (or your header of choice) for characters
> /not/ in the range you want.
>

Good concept. Worth a try. 

Alan

-- 
http://home.earthlink.net/~alanconnor/contact.html
Other URLs of possible interest in my headers.
Technical Details
Message-ID: <slrne64iha.1i2.i3x9mdw@b29x3m.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!65807237!not-for-mail
References: <f1Y5g.3076$Vn.665@newsread4.news.pas.earthlink.net> <Xns97B9D5E2804216106emteedee@217.22.228.20> <Xns97B9E4FE3D54emteedee@148.160.160.156> <slrne5jda9.2th.i3x9mdw@b29x3m.invalid> <Xns97B9D8EBBC06DMTEyMDM1ODE0NDo6MjA3@195.13.230.46> <slrne5nm67.2a1.i3x9mdw@b29x3m.invalid> <w3X6g.5965$DT5.688@newsread3.news.pas.earthlink.net> <slrne5okdm.13a.i3x9mdw@b29x3m.invalid> <V_47g.4428$Vn.2594@newsread4.news.pas.earthlink.net> <slrne5qeld.1eu.i3x9mdw@b29x3m.invalid> <rGh7g.230$t32.84@newsread2.news.pas.earthlink.net> <slrne5rbq5.1ju.i3x9mdw@b29x3m.invalid> <jgW7g.400$y4.144@newsread2.news.pas.earthlink.net> <slrne61dtv.144.i3x9mdw@b29x3m.invalid> <slrne61eff.16n.i3x9mdw@b29x3m.invalid> <9198g.637$y4.556@newsread2.news.pas.earthlink.net> <slrne632no.3ha.i3x9mdw@b29x3m.invalid> <20060510215148@usenet.piggo.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrne64iha.1i2.i3x9mdw@b29x3m.invalid>
Subject: Re: [SLRN] Favorite scorefile entries, was Re: X-Privat, was...
Date: Wed, 10 May 2006 21:21:19 GMT
From: Alan Connor <i3x9mdw@j9n35c.invalid>
References: <f1Y5g.3076$Vn.665@newsread4.news.pas.earthlink.net> <Xns97B9D5E2804216106emteedee@217.22.228.20> <Xns97B9E4FE3D54emteedee@148.160.160.156> <slrne5jda9.2th.i3x9mdw@b29x3m.invalid> <Xns97B9D8EBBC06DMTEyMDM1ODE0NDo6MjA3@195.13.230.46> <slrne5nm67.2a1.i3x9mdw@b29x3m.invalid> <w3X6g.5965$DT5.688@newsread3.news.pas.earthlink.net> <slrne5okdm.13a.i3x9mdw@b29x3m.invalid> <V_47g.4428$Vn.2594@newsread4.news.pas.earthlink.net> <slrne5qeld.1eu.i3x9mdw@b29x3m.invalid> <rGh7g.230$t32.84@newsread2.news.pas.earthlink.net> <slrne5rbq5.1ju.i3x9mdw@b29x3m.invalid> <jgW7g.400$y4.144@newsread2.news.pas.earthlink.net> <slrne61dtv.144.i3x9mdw@b29x3m.invalid> <slrne61eff.16n.i3x9mdw@b29x3m.invalid> <9198g.637$y4.556@newsread2.news.pas.earthlink.net> <slrne632no.3ha.i3x9mdw@b29x3m.invalid> <20060510215148@usenet.piggo.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!65807237!not-for-mail
Newsgroups: news.software.readers
X-Homepage: http://home.earthlink.net/~alanconnor/
X-Fanclub: http://www.pearlgates.net/nanae/kooks/ac/
X-Newsreader: http://slrn.sourceforge.net/docs/README.offline
User-Agent: slrn/0.9.8.1 (Debian)
Lines: 121
NNTP-Posting-Host: 4.242.9.43
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread3.news.pas.earthlink.net 1147296079 4.242.9.43 (Wed,
NNTP-Posting-Date: Wed, 10 May 2006 14:21:19 PDT
Organization: EarthLink Inc. -- http://www.EarthLink.net