🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #234800

Re: [slrn] Can I make a rule that will auto-ignore all follow-ups to a certain author?

#234800
From: Troy Piggins
Date: Wed, 29 Jul 2009 08:17
90 lines
4833 bytes
* ShadowTek wrote :
> On 2009-07-29, Troy Piggins <usenet-0907@piggo.com> wrote:
> [---=| Quote block shrinked by t-prot: 7 lines snipped |=---]
>> I think he's hard coded in who he wants to automatically killfile
>> replies to.  Maybe you can edit that part if it's only the one
>> person.
>>
>> Whatchya reckon?
>
> I've made a couple of small scripts in C, but it's been a while, and
> although it's similar, I've never made anything with slang before.

If you've done some C, you shouldn't have any trouble with
s-lang.

> I started by referencing the functions to understand exactly what was
> being done, and then gradually working my way down the script.
>
> Thusfar, I've needed to reference 3 function lists to understand what
> all is going on:
>
>  slang functions:
>   http://www.jedsoft.org/slang/doc/pdf/slangfun.pdf
>
>  slrn intrinsic functions:
>   http://alcor.concordia.ca/topics/netnews/slrn/doc/macros.html
>
>  slrn interactive functions:
>   http://slrn.sourceforge.net/docs/slrn-manual-7.html

Not sure if you compiled from source or installed some distro's
package.  But with the source, there are some files to help you.
I refer to them all the time when I'm tinkering with macros.

/usr/local/share/doc/slrn/manual.txt
/usr/local/share/doc/slrn/slrnfuns.txt
/usr/local/share/doc/slrn/README.macros and more

Similarly there are some very useful files with the s-lang v2
source in /usr/local/share/doc/slang/v2

Anyway...

> But now I've gotten to a part that involes complex string functions that
> I'm unfamiliar with:
>
>    variable expression = "(string_match("+hdr+
>      ",\"[^ ]+ +[^ ]+ +<.+@.+>\",1) == 0) and (string_match("+hdr+
>      ",\"peter\\.bergt\",1) == 0) and (string_match("+hdr+
>      ",\".+@.+ +([^ ]+ [^ ]+.+)\", 1) == 0)";
>
> Can anyone explain what's going on here, step-by-step?

Hell no.  Too tired for that and will need some time to absorb it
myself.  And I'm no expert at all at s-lang.

But this is just setting a variable called "expression" to
simplify the "eval" function a couple of lines down.   Think the
"+" is just concatenating strings.  Lots of escape chars in there
for protecting quotes etc.

Essentially I think this is the part to match the "From" header,
and you'd want to change "peter\\.bergt\" to "Nicholas\", unless
you don't want to punish everyone called Nicholas.  You might be
able to include the xx@yyy.zzz part of his From header, but need
to experiment with escaping the "." etc.

Hope that makes sense.

> I don't know whether things are being used from slang, or slrn, or what.

It's all s-lang.

> For instance, where can I 
> find a reference to the functionallity that [^ ] provides?
>
> It *is* mentioned in slrn's score file FAQ
> http://slrn.sourceforge.net/docs/slrn-FAQ-4.html#ss4.19
> but where's the actual documentation for this function?

I don't think it's the same as the slrn score file syntax.  I
think, but may stand corrected, that it's trying to match "not a
space character".

> I tried using a search engine, but there where no results. I
> think that the use of those particular characters must have
> prevented a successful search.

-- 
Troy Piggins
Technical Details
Message-ID: <20090729175840@usenet.piggo.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.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!not-for-mail
References: <guhtt9$82j$1@news.motzarella.org> <slrnh0p4lk.9q2.catwheezel@ID-107770.user.individual.net> <slrnh6sm2b.be4.ShadowTek@desktop.localdomain> <20090729080451@usenet.piggo.com> <slrnh6v215.m8d.ShadowTek@desktop.localdomain> <20090729101510@usenet.piggo.com> <slrnh6vnoo.8ce.ShadowTek@desktop.localdomain>

Show Full Headers
Complete Article Headers
Message-ID: <20090729175840@usenet.piggo.com>
Subject: Re: [slrn] Can I make a rule that will auto-ignore all follow-ups to a certain author?
Date: Wed, 29 Jul 2009 18:17:26 +1000
From: Troy Piggins <usenet-0907@piggo.com>
References: <guhtt9$82j$1@news.motzarella.org> <slrnh0p4lk.9q2.catwheezel@ID-107770.user.individual.net> <slrnh6sm2b.be4.ShadowTek@desktop.localdomain> <20090729080451@usenet.piggo.com> <slrnh6v215.m8d.ShadowTek@desktop.localdomain> <20090729101510@usenet.piggo.com> <slrnh6vnoo.8ce.ShadowTek@desktop.localdomain>
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!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!not-for-mail
Newsgroups: news.software.readers
Organization: A noiseless patient Spider
Lines: 90
Reply-To: usenet-0907@piggo.com
X-Trace: news.eternal-september.org
 U2FsdGVkX19DMMNBoYIfT9slAB8GTAszyAo0uRMIsOLmQ1va/dVV73JAGzsA5u2HKsNoRU/sq8mM8qJb3TIbGNwJVpRbLXqB/c/a7xyL/LQpda3tyHOhAkaCGmVvmI71V8/cjrT5OgYHD3SzaNmcju7sFPDeLBXu
X-Complaints-To: abuse@eternal-september.org
NNTP-Posting-Date: Wed, 29 Jul 2009 08:21:58 +0000 (UTC)
X-Auth-Sender: U2FsdGVkX1/mbmDQYvso2zu7Cs4O7wZPyQbqHPxq18Yqs7EuapA4pg==
X-NNTP-Proxy: Leafnode-2
 (http://www-dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/)
Cancel-Lock: sha1:iGtroK4QNIBGPq9lThcVL3pVEY8=
User-Agent: slrn/pre1.0.0-11/rt (Linux)