🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #199001

Re: Pan and SLRN score files - The difference?

#199001
From: Blinky the Shark
Date: Thu, 03 May 2007 15:21
105 lines
4940 bytes
Peter J Ross wrote:
> In news.software.readers on Thu, 03 May 2007 11:39:50 GMT, Bob the
> Burger-Builder <Burger@Build.dur> wrote:
>
>> Pan is supposed to be able to use SLRN scorefiles. While this may be true
>> if auto-generated scores are transfered, I've found that custom score
>> files tend to crash and burn, or just do nothing.
>
> Auto-generated scorefiles rarely contain anything complicated.
>
>> The reason why took me some time to dig/figure out. Pan and SLRN use
>> different interpreters or something, slang/pcre/?
>
> Yes. S-Lang regular expressions use a different syntax from PCRE, and
> complicated examples may be incompatible. Here's a highly artificial
> example with whitespace added for clarity:
>
> S-Lang: \C    \<  \(  \d\d\d  \)  \1  \c     Z  \>
> PCRE:   (?i)  \b  (   \d{3}   )   \1  {?-i}  Z  \b
>
> Both these expressions match a "word" of six digits and an uppercase Z
> in which digits 4-6 are the same as digits 1-3, such as "123123Z", but
> neither will work in the wrong language. So if you have anything in
> your Slrn scorefile that uses \C or \c, \< or />, \( or \), it will
> either break or not match if you try it in Pan.
>
> Also, groups of Slrn rules that use the "{: ... }" syntax will break
> in Pan. You'll have to use PCRE's OR operator "|" instead.
>
>> and while the
>> standard auto-generated score file from SLRN MAY be read successfully by
>> Pan, its a matter of luck if it works at all as the syntax for the two
>> application's is disarmingly similar but different.
>
> One thing that's likely to break even in a simple scorefile is
> parentheses. E.g., to match a Subject containing "(was:" in Slrn,
> you'd use
> 	(was:
> but in Pan this would have to be
> 	\(was:
> and the Slrn version would break. 
>
> I can't think of many other things that would break in auto-generated
> scorefiles.
>
>> This could be why Pan only scores on a simpler set of criteria that the
>> more complex and customisable SLRN.
>
> No, Pan can match fewer headers than Slrn, but the matching
> capabilities for each header are at least as extensive.
>
>> It is also why Pan just quietly
>> ignores a whole scorefile if one detail is not to it's liking, a highly
>> likely event judging by the number of posts I've skimmed through by folks
>> trying to figure out why Pan doesn't use SLRN scorefiles as legend would
>> have it.
>
> It's a pity if Pan doesn't provide an error message when the syntax is
> wrong.
>
>> So, onto my question. (At last!)
>>
>> Does anybody have any info regarding the syntax required to construct
>> scorefiles for *Pan*?
>
> $ man 3 pcrepattern
>
>> I have a selection of scorefiles for SLRN, but need to "convert" the data
>> within them to make sure it does indeed work as Pan requires.
>
> To summarise:
>
> Change "\(" and "\)" to "(" and ")"
> Change "(" and ")" to "\(" and "\)"
> Change "\<" and "\>" to "\b"
> Change "\C" to "(?-i)" and "\c" to "(?i)"
>
> Change any rules that use the "{: ... }" syntax to use "|". This may
> be complicated: here's a real example from my scorefile:
>
> 	Score: =10
> 	From: pjr@example\.invalid
> 	{::
> 		Message-ID: @pjr\.gotdns\.org
> 		Message-ID: @pjr\.motzarella\.org
> 	}
>
> This would become:
>
> 	Score: =10
> 	From: pjr@example\.invalid
> 	Message-ID: @pjr\.(gotdns|motzarella)\.org
>
>
> I hope some of that will help. I've probably missed many of the
> possible problems, and if there isn't at least one typo somewhere I'll
> be surprised.

Wow.  I'm glad my custom rules in the score file used by both slrn and
Pan are simple and workable for both.

-- 
Blinky                                                   RLU 297263 
Killing all posts from Google Groups
The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html
Technical Details
Message-ID: <slrnf3jvg0.j5l.no.spam@thurston.blinkynet.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.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <pan.2007.05.03.11.40.26.188353@Cuppa.tea> <slrnf3jma1.6p4.pjr@pjr.gotdns.org>

Show Full Headers
Complete Article Headers
Message-ID: <slrnf3jvg0.j5l.no.spam@thurston.blinkynet.net>
Subject: Re: Pan and SLRN score files - The difference?
Date: Thu, 03 May 2007 15:21:53 +0000
From: Blinky the Shark <no.spam@box.invalid>
References: <pan.2007.05.03.11.40.26.188353@Cuppa.tea> <slrnf3jma1.6p4.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!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.readers
Lines: 105
X-Trace: individual.net gEx4xW/YR1Y5zVNVH4raQQjXTZ3RyjvD8S00DCNpQgZmhCEsf9
X-Face: Jb-wQ7r&vrN}~8MC5B09S4&.ieh!Q:Di/XN.xrd#CU%;
 )bPa`Hm^(,3o$n(s75[P+$F+Q^4~Owj`WzkBtZU/#gL2BvEBm/e=/1,R0}d@q@)E
X-OS: Mandriva 2006 Linux; kernel 2.6.12
X-WebTV-Stationery: Standard; BGColor=black; TextColor=black
User-Agent: slrn/0.9.8.1 (Linux)