🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #199094

Re: Pan - custom score filters (more on)

#199094
From: Peter J Ross
Date: Fri, 04 May 2007 16:18
77 lines
3223 bytes
In news.software.readers on Thu, 03 May 2007 22:11:00 GMT, Bob the
Burger-Builder <Burger@Build.dur> wrote:

>
> Eyestrain'R'Us :(
>
> So far I've got this working,
>
> %%% BEGIN Custom config ==============================
>
> %BOS
> [^\S] % PLONK for all groups

Does Pan use regular expressions instead of wildmats for newsgroup
names then? If so, its format is less like Slrn's than I thought.

> Score: =-9999
> From: ^"Idiot" <idiot@aol\.con>|"Bozo"<bozo@hotmail.con>|"Pest" <best@yahoo.con>$
> %EOS

The ^ only matches the "Idiot" entry, and the $ only matches the
"Pest" entry.

I suggest ^(...|...|...)$

But idiots, bozos and pests like to morph, so this kind of rule may be
too strict in practice.

> %BOS
> [^\S] % WATCH for all groups
> Score: -9999
> From: ^"Mentor" <mentor@genius\.org>|"Interesting" <interesting@witty\.one>|"Joker" <joker@funny\.org>|$
> %EOS

Same applies as above. And this time you have an extra "|", which
means that this pattern will match *everything* that ends with a
newline.

> %%% END Custom config ================================
>  
> I've yet to figure out how to get each entry on it's own line without
> breaking things.

Add an extra colon after "Score":

Score:: -9999
	From: ^"Mentor" <mentor@genius\.org>$
	From: ^"Interesting" <interesting@witty\.one>$
	From: ^"Joker" <joker@funny\.org>$

> I've tried |\n at the end of each line and several
> combinations thereof, but can't find the clues in the man.3.pcrepattern
> man page. (I am getting a tad boggle-eyed though.)

See "INTERNAL OPTION SETTINGS".

> My one remaining biscuit goes to the first with the functioning clue.
>
> ie: How to do this,
>
> %BOS
> [^\S] % PLONK for all groups
> Score: =-9999
> From: ^"Idiot" <idiot@aol\.con>|BREAK
> "Bozo"<bozo@hotmail.con>|BREAK
> "Pest" <best@yahoo.con>$
> %EOS
>
> What replaces "BREAK" ?

You can try adding {?m} at the start of the regex, i.e. after "From:",
because that turns on "multi-line" parsing, but I doubt if it will
work in Pan. Pan doesn't parse the regex; PCRE does.


-- 
PJR :-)
Technical Details
Message-ID: <slrnf3mn6t.cvt.pjr@pjr.gotdns.org>
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!postnews.google.com!news1.google.com!news.glorb.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mail
References: <pan.2007.05.03.22.11.29.908092@Cuppa.tea>

Show Full Headers
Complete Article Headers
Message-ID: <slrnf3mn6t.cvt.pjr@pjr.gotdns.org>
Subject: Re: Pan - custom score filters (more on)
Date: Fri, 04 May 2007 16:18:46 +0000
From: Peter J Ross <pjr@example.invalid>
References: <pan.2007.05.03.22.11.29.908092@Cuppa.tea>
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!postnews.google.com!news1.google.com!news.glorb.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mail
Newsgroups: news.software.readers
Reply-To: pjr.spam@gmail.com
User-Agent: slrn/0.9.8.1pl2 (Debian)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 77
Organization: Read Free News
NNTP-Posting-Date: 04 May 2007 11:18:46 CDT
X-Trace: DXC=kh_O?^\A@\R>F>[bO_D9]T]AGWjF5PjPY465Ue@WB_5_6XLZVnmNIZ[26Z<EbT:a\U2XQX54M@PfRhWjUSN4PCfVne3ID=<PkgQ