🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #121296

Re: Show me your slrn score file.

#121296
From: Alan Gutierrez
Date: Wed, 05 Mar 2003 21:28
174 lines
7167 bytes
In article <4pthj-0h5.ln1@news.invalid.99computer>, Mike Vanecek wrote:
> On Mon, 24 Feb 2003 08:28:03 GMT, Alan Gutierrez wrote:

> [snip] 

>> Great. I expanded on this. I chose the Perl route since I'm not
>> keen to learn yet another macro langauge. The Perl program
>> modifies a score file called auto.score. It creates entries based
>> on the headers From, Message-ID, and Subject.

> I am new to all this, so please be understanding. If I understand
> this correctly, these are the options you pass to the below perl
> program?

>> score [options] < [article]
>> 
>> -f              by From (default)
>> -m              by Message-ID
>> -S              by Subject
>> 
>> -k              kill, set score -9999
>> -i              ignore, set score -1000
>> 
>> -s [num]        set score to num
>> -p [num]        add num points to score (can be negative)
>> -e [interval]   expire after interval
>>                 never 
>>                 now - yesterday
>>                 3d  - days                  - 3 days
>>                 6w  - weeks                 - 6 weeks             
>>                 4m  - months (roughly)      - 4 * 30 days
>>                 2q  - quarters (roughly)    - 2 * 30 * 3 days
>>                 3y  - years (roughly)       - 2 * 365 days
>> -g [group]      group for rule. the default is to use the
>>                 Newsgroups header appending wildcard *.
>> -u [num]        Up, use group num levels above -g group.
>> -o              Only, do not append wildcard *.
>> 
>> Now I can plonk with one command. I can also add authors to the
>> auto.score file and move their scores up or down as I read their
>> articles.

> How do you use one command? Do you have an article open in slrn
> and then do | command to execute your perl program? Eg., lets say
> I want to watch an article in a single news group for 30 days.
> While reading the article, would I type

>| score -mo -s 250 -e 30d < ???

When I press | on my keyboard I get this prompt:

Pipe to command:

And so I'd enter:

Pipe to comamnd: score -m -o -s 250 -e 3Od

The atricle viewed is fed as input to score. My Perl program reads
the headers to determine the newsgroup and  Message-ID.

Your notation for combining the switches -mo is not supported, but
if anyone else wants to use the program, I'll fix that. 

> What do I put in for <???

Nada, slrn will do that for you.

> I assume you call this program score.pl and use it as I question above?

<not-quite-on-topic>
Nope. I call it score. Adding language suffixes to executables is a
Windows/Python thing. It is a Bad Idea(R). The language is an
implmentation detail. The user does not not need to know that the
language is Perl.  It also means that if I were to rewrite the
program in shell or C, I'd have to rename the program, and break any
scripts that called the programe when it was named *.pl. Adding
language suffixes to programs is so silly, we don't call our
newsreader slrn.c. This is all just FYI.
</not-quite-on-topic>

> Or do you call this shell script from slrn doing a
> | mod watch

I find myself saying these things the most often:

# add 100 points to author in comp.lang.c++* when reading
# comp.lang.c++

Pipe to command: mod boost

# add 100 points to author in comp.lang.perl* when reading
# comp.lang.perl.misc.

Pipe to command: mod up 1 boost                

# add 100 points to author in comp.lang.c++* when reading article
# cross-posted to comp.lang.c.

Pipe to command: mod grp comp.lang.c++ boost

# have the last word.

Pipe to command: mod plonk

# when I've accedently given an author 500+ points (300 is my
# min_high_score)

Pipe to command: score -s 350

I've found that once I've been through a group I'm familiar with
three times, I've got a very nice score file that brings the best
threads to the top when I sort first by thread then by score.

It is nice that when you press | slrn starts you off the with
command you last entered. That way, once you've entered the proper
incantation to mod boost, you can just hit |<enter> to bring your
favorite authors up notch.

> If so, where does it pick up the article information?

As noted above, slrn will fed the program the entire article with
headers to the program.

> Could the mod functionality have been incorporated in the perl program
> so that you could call score directly with the same arguments?

I suppose, but score now creates score files for mutt as well as
slrn. The mod shell script was just my bridge between the slrn and
the score program arguments, which are fiddly, and getting even more
fiddly.

I also like typing the words plonk, boost, and bravo. Typing mod
plonk is somehow more satifying that typing score -k.

> This is very nice. Certainly adds functionality over the one-key
> approach. Is the score applied immediately or not until slrn is
> restarted?

I was going to look for a reapply score file macro in slrn.
Currently, when I want the score file applied, I <Esc> 1 k to edit
my base score file and exit my editor. Then slrn will prompt to
re-evaluate the score file.

Sometimes I hold off, because the resorting confuses me.

> Thank you for posting this.

New features:

* when you press v in slrn to view the scores that match the current
  article, it will note display by author, by subject, by article,
  or whatever comment you provide.  Is is quite useful to see what
  if any auto scores matched.

* score file name is now an argument.

* options new viewed with score -h.

* creates score files for mutt.

http://www.izzy.net/~ajglist/score
http://www.izzy.net/~ajglist/mod

If anyone want to use this script, please let me know! Open to
suggestions.

I'd like to figure out a way to really *plonk* someone so that when
they post, not only are their articles killed, but also any
responses. That is, you don't have to keep re-killing threads.

-- 
Alan Gutierrez - ajglist@izzy.net
http://khtml-win32.sourceforge.net/ - KHTML on Windows
Technical Details
Message-ID: <slrnb6cruc.a2b.ajglist@izzy.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!west.cox.net!cox.net!p01!news2.east.cox.net.POSTED!53ab2750!not-for-mail
References: <slrnb5fm71.er3.ajglist@localhost.localdomain> <gan83b.m67.ln@192.168.1.75> <slrnb5jmv5.sb.ajglist@izzy.net> <4pthj-0h5.ln1@news.invalid.99computer>

Show Full Headers
Complete Article Headers
Message-ID: <slrnb6cruc.a2b.ajglist@izzy.net>
Subject: Re: Show me your slrn score file.
Date: Wed, 05 Mar 2003 21:28:25 GMT
From: Alan Gutierrez <ajglist@izzy.net>
References: <slrnb5fm71.er3.ajglist@localhost.localdomain> <gan83b.m67.ln@192.168.1.75> <slrnb5jmv5.sb.ajglist@izzy.net> <4pthj-0h5.ln1@news.invalid.99computer>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!west.cox.net!cox.net!p01!news2.east.cox.net.POSTED!53ab2750!not-for-mail
Newsgroups: news.software.readers
User-Agent: slrn/0.9.7.4 (Linux)
Lines: 173
NNTP-Posting-Host: 68.14.102.70
X-Complaints-To: abuse@cox.net
X-Trace: news2.east.cox.net 1046899705 68.14.102.70 (Wed, 05 Mar 2003 16:28:25 EST)
NNTP-Posting-Date: Wed, 05 Mar 2003 16:28:25 EST
Organization: Cox Communications