🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #198997

Re: Pan and SLRN score files - The difference?

#198997
From: Bob the Burger-Builder
Date: Thu, 03 May 2007 14:50
89 lines
4471 bytes
Peter J Ross <pjr@example.invalid> apparently said ...:

> 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
[...]
>> 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.

Many thanks! Just the "prod in the right direction" I wanted.

I'll post up how things go, and hopefully knock a script up to auto
convert SLRN scores to Pan. (Ambitious or what!) ;)

Technical Details
Message-ID: <pan.2007.05.03.14.51.18.602491@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!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!news.clara.net!wagner.news.clara.net!pe1.news.blueyonder.co.uk!blueyonder!fe3.news.blueyonder.co.uk.POSTED!53ab2750!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: <pan.2007.05.03.14.51.18.602491@Cuppa.tea>
Subject: Re: Pan and SLRN score files - The difference?
Date: Thu, 03 May 2007 14:50:46 GMT
From: Bob the Burger-Builder <Burger@Build.dur>
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!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!news.clara.net!wagner.news.clara.net!pe1.news.blueyonder.co.uk!blueyonder!fe3.news.blueyonder.co.uk.POSTED!53ab2750!not-for-mail
Organization: Hicksian Dynamics Unlimited
User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table)
Newsgroups: news.software.readers
Reply-To: void@dev.nul
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
Lines: 89
NNTP-Posting-Host: 82.47.150.87
X-Complaints-To: http://www.virginimedia.com/netreport
X-Trace: fe3.news.blueyonder.co.uk 1178203846 82.47.150.87 (Thu,
NNTP-Posting-Date: Thu, 03 May 2007 15:50:46 BST