🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #36564

Re: [slrn] Variables in scorefile?

#36564
From: Hubert Canon
Date: Fri, 10 Oct 1997 00:00
30 lines
1980 bytes
Dans news.software.readers, J.B. Nicholson-Owens �crivait :
> I am fully aware how scorefiles can be created to do what you describe, I
> already use that in my scorefile.  However, that does not address the
> situation where I must have lines like the above 3 that share a lot of
> newsgroups.  When I need to edit the groups common to all the lines above, I
> have to make changes to multiple lines. That is silly and prone to making
> mistakes[1].  Variables would fix this:
> 
>   [%moderated_groups ()]
>   [%moderated_groups (), supernews.*]
>   [~ %moderated_groups (), supernews.*, midwest.*,
>      news.admin.technical, ...]
> 
> is far more clear and maintainable.

What about using a preprocessor like m4 or cpp ?
You may have your source in News/Score.m4 which you pass through m4
with a command like "m4 News/Score.m4 > News/Score" and your
News/Score.m4 looks like :

define(moderated_groups, `clari.*, *.moderated, whatever.*')
[moderated_groups]
[moderated_groups, supernews.*]
[~ moderated_groups, supernews.*, midwest.*, news.admin.technical, ...]

-- 
Hubert Canon

Technical Details
Message-ID: <slrn63sjme.44k.Hubert.Canon@guenievre.irisa.fr>
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!not-for-mail
References: <slrn63gm05.ad.jbn@pop-a-wheelie.midwest.net> <slrn63gr84.13h.sp_robi@Elvira.home> <slrn63h1ti.ad.jbn@pop-a-wheelie.midwest.net> <slrn63rfmg.bnv.sp_robi@Elvira.home> <slrn63rp0b.411.jbn@pop-a-wheelie.midwest.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn63sjme.44k.Hubert.Canon@guenievre.irisa.fr>
Subject: Re: [slrn] Variables in scorefile?
Date: Fri, 10 Oct 1997 00:00:00 +0000
From: Hubert.Canon@irisa.fr (Hubert Canon)
References: <slrn63gm05.ad.jbn@pop-a-wheelie.midwest.net> <slrn63gr84.13h.sp_robi@Elvira.home> <slrn63h1ti.ad.jbn@pop-a-wheelie.midwest.net> <slrn63rfmg.bnv.sp_robi@Elvira.home> <slrn63rp0b.411.jbn@pop-a-wheelie.midwest.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.mbox.zip!not-for-mail
X-Deja-AN: 279242941
Distribution: world
X-Disclaimer: Je ne poste pas au nom de l'IRISA
Mail-Copies-To: never
X-Courtesy-Copy: no
Organization: Irisa, Rennes (FR)
Newsgroups: news.software.readers