pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] UIP where?


From: Duncan
Subject: Re: [Pan-users] UIP where?
Date: Tue, 20 Nov 2012 17:11:31 +0000 (UTC)
User-agent: Pan/0.140 (Chocolate Salty Balls; GIT f91bd24 /usr/src/portage/src/egit-src/pan2)

Bob posted on Tue, 20 Nov 2012 02:28:11 +0000 as excerpted:

> On Mon, 19 Nov 2012 22:31:54 +0000, Beartooth wrote:
> 
>> On Sun, 18 Nov 2012 20:53:27 +0000, Duncan wrote:
>> 
>>> Beartooth posted on Sun, 18 Nov 2012 19:53:46 +0000 as excerpted:
>>> 
>>>> The Usenet Improvement Project offers a filter for Pan
>>>> 
>>>> [*]
>>>> Score:: =-9999 Message-ID: googlegroups Message-ID: webtv
>>>> 
>>>> but it doesn't say where to put it. I don't see a canonical-looking
>>>> place it go??
>>> 
>>> 
>>> That would go in the scorefile itself (text-edit added, not via the
>>> pan UI).
>>> 
>>> The [] lines indicate the newsgroup (*-wildcard in this case) and
>>> start a section.  The Score: lines start an individual score, and the
>>> Message-ID:
>>> lines are conditions for applying that score.  (Without looking it up
>>> to be sure, I believe Score: single-colon indicates AND, ALL
>>> conditions would need to match to trigger, Score:: double-colon
>>> indicates OR, ANY matched condition triggers.)
>> 
>>      OK, let's see if I've got it. I went to .pan2, and opened it with
>> gedit.
>> 
>>      It was full of short passages with blank lines between, each with
>> "%BOS" and "%EOS" at start & finish. Each also had a line saying it had
>> been made by Pan.
> 
> The %BOS stands for Beginning of Score and the %EOS stands for End of
> score.  There must be a blank line between the final %EOS and the new
> %BOS

This is incorrect.  See below.

>>      I skipped a line, then inserted what the UIP had given me,
>> verbatim (without the BOS/EOS, being as how I'm not Pan). Is that
>> right?
> 
> No. It must be entered just like the other scores in the score file.

This is incorrect (and Bear is correct).  In the score-file format, lines 
beginning with % are comment lines (so % in pan's score-file format is 
very similar to the # in traditional *rc and other config files, as well 
as in shell scripts).

Pan simply includes them when you use the GUI to create a score, in an 
attempt to make things clearer for those hand-editing the file.  However, 
the lines can be entirely deleted if desired and it won't affect how pan 
interprets the scores at all.

Of course you may add your own comment lines as well, or conveniently use 
% to "comment-out" a line if you're testing and not yet sure whether you 
wish to actually delete the line or not, just as people do with # in 
shell-scripts and traditional Unix style config files.

Because these lines are simply comments, and blank lines are effectively 
ignored as well, the above claim that there must be a blank line between 
a preceding %EOS and the next %BOS lines is incorrect as well.


I've posted these links many times over the years, but it's worth 
reposting them once again.  Pan's Scorefile format is adopted from slrn's 
format, with two differences: (1) pan doesn't have a couple of the 
advanced features (include files for sure, also the has-body conditional, 
I think), and (2) pan's scoring is case-insensitive, scoring on "pan" or 
"PAN" or "Pan" or "pAN" or.... shouldn't matter.

http://www.slrn.org/docs/score.txt

For those willing to do it, editing the scorefile directly makes sense as 
it's possible to "optimize" pan's scoring, eliminating excess comments, 
consolidating many added-by-GUI scores into one and combining multiple 
scores into single score sections (delimited by [newsgroup] entries, see 
the documentation link), etc.  After one gets used to doing so, pan's GUI 
method of editing seems baroque and inefficient indeed, tho it's a 
convenient way to get a new entry started, after which the user can open 
the scorefile directly, editing the "start" created by the GUI, possibly 
removing/adding/changing comments, and placing it at the appropriate 
location in the file to optimize sections, etc.

Here, I keep my permanent entries nicely edited and optimized, but rather 
more lightly edit temporary/expiring scores, keeping them separate from 
the optimized "permanent" scores.  Only the temporary/expiring scores 
have a comment (similar to pan's %BOS lines) with the date added (since 
the expires line documents when it expires, but only a comment documents 
when it was added), but I normally delete the %EOS comments entirely, as 
extraneous noise.


Meanwhile, just as pan did, the (AFAIK MSWormOS based) xnews also 
borrowed the slrn sorefile format, but they have a few other changes as 
well.  So for people just getting into manually editing this file, I'd 
suggest avoiding their documentation in ordered to avoid confusion, but 
for those interested in studying another implementation and where they 
chose to implement differences, the xnews scorefile document can be quite 
interesting as well.

http://xnews.remarqs.net/scoring.txt


>>      When I told gedit to save, it renamed the file to Score~; I
>> changed that to plain "Score" and the original to "ScoreOLD"
> 
> That way you haven't done anything.  The Score~ file is the backup,
> ScoreOLD is the file you saved and should be Score or score(however the
> original file was or was not capitalized.

When I read Bear's post, I interpreted the above as him doing it 
correctly.  After reading your reply, I'm confused enough by the wording 
in both to be unsure.  Yes, the Score~ file is an automatically created 
(by gedit) backup.  Ordinarily, it would work this way: The original file 
would be renamed to Score~, while the edited and saved version would keep 
the original Score name.  There would be no need to create a manual 
backup called ScoreOLD unless an "extra" manual backup was actually 
desired, to be /doubly/ sure, or whatever.  But the wording of Bear's 
post and your reply are confusing enough I'm not sure which one got 
renamed to Score, and where ScoreOLD came in, and...

The way to be sure would be to open the Score file again, and see if it 
has the desired changes.  If it does, everything should be fine.  If it 
doesn't, then they can either be manually added once again, or whatever 
backup has the desired changes can be renamed or copied to Score, so pan 
sees and uses it.


>>      So have I Eternalized September, Lo! these many moons later?

The irony is indeed recognized, yes. =:^)



-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




reply via email to

[Prev in Thread] Current Thread [Next in Thread]