🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #121549

Re: [slrn] scoring on subject in replies

#121549
From: J.B. Nicholson-Owens
Date: Sun, 09 Mar 2003 03:06
42 lines
2881 bytes
Gruebait wrote:
> The relevant section in my file was:
> 
>  [news.software.readers]
>        # All slrn articles

You should change the comment notation to percent signs ("%") instead of
pound signs/hashes ("#").  Unlike Perl and shell scripts (which use "#" to
mark comments), S-Lang uses "%".  So the following score entry

  [news.software.readers] % this is a comment
     % this is also a comment
     Score: 10 % This too is a comment
       Subject: text % not a comment

will increase the score of any post in news.software.readers by 10 points if
that article's Subject: header matches the "text % not a comment" regular
expression.  You cannot put comments on the same line as a regular
expression in a slrn scorefile and have slrn parse out both the regular
expression and the comment.

If you require comments on the same line as a regular expression in a slrn
scorefile you'll need to pre-process the scorefile before slrn reads it.

> I suppose I'll just have to learn about S-lang pattern matching (sigh)

Don't worry, it's not hard and it's not very time consuming.  If you
understand Perl's regular expressions (including pcre's, which are designed
to be the same as Perl's), or Emacs' regular expressions you already
understand far more than S-Lang will currently handle.  I expect this will
change in the next major revision of S-Lang (see
<slrnb69tfc.hu8.davis@aluche.mit.edu> for more details from John E. Davis,
primary developer of S-Lang).

The main difference between the regular expressions you use in slrn's
scorefile and anywhere else you would use S-Lang's regular expressions
(e.g., what you would use in a slrn macro) is that slrn's scorefile uses
case-*in*sensitive regular expressions while other S-Lang applications use
case-sensitive regular expressions.

Happy newsreading.
Technical Details
Message-ID: <slrnb6ldki.a5p.jbn@forestfield.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.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
References: <3e69f26f@news.starnetinc.com> <slrnb6kkib.a5p.jbn@forestfield.org> <3e6a58fe$1@news.starnetinc.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrnb6ldki.a5p.jbn@forestfield.org>
Subject: Re: [slrn] scoring on subject in replies
Date: Sun, 09 Mar 2003 03:06:52 +0000
From: "J.B. Nicholson-Owens" <jbn@forestfield.org>
References: <3e69f26f@news.starnetinc.com> <slrnb6kkib.a5p.jbn@forestfield.org> <3e6a58fe$1@news.starnetinc.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.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!forestfield.ORG!not-for-mail
Newsgroups: news.software.readers
Organization: Forest Field OmniMedia
Lines: 41
NNTP-Posting-Host: forestfield.org (208.216.67.173)
X-Trace: fu-berlin.de 1047179212 66399056 208.216.67.173 (16 [35848])
Mail-Copies-To: nobody
User-Agent: slrn/0.9.7.4pl2 (GNU/Linux)