pan-users
[Top][All Lists]
Advanced

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

[Pan-users] Re: Migrate settings from old pan


From: Duncan
Subject: [Pan-users] Re: Migrate settings from old pan
Date: Fri, 6 Jun 2008 00:52:15 +0000 (UTC)
User-agent: Pan/0.132 (Waxed in Black)

Jim Henderson <address@hidden> posted
address@hidden, excerpted below, on  Thu, 05 Jun 2008 21:23:39
+0000:

> On Thu, 05 Jun 2008 13:50:06 -0700, Peter Scott wrote:
> 
>> Is there any automated assistance available?
> 
> Nope.  New pan and Old pan are completely different.

Well, not /completely/.  Some of the files are the same, some different.

I must admit it has been awhile since anyone asked and I may have 
forgotten some details.  If you look back in the list archives a couple 
years, you'll see answers from that time with the details if I'm missing 
any here.  That said...

The main thing that's similar is the scorefile, but there's some 
differences as the new format is stricter.  It's based on the same thing, 
slrn/xnews scorefile format, but the newsgroups line syntax of xnews uses 
regex like the other matching test lines, while slrn uses plain * 
wildcard lines.  Old-pan tried to accomodate both styles, detecting on 
the fly for each newsgroup line as it read it, which style was used, but 
it was always buggy, so Charles decided to go with a stricter slrn 
newsgroup line format (only) in new-pan.  Thus, if your newsgroups lines 
were all * wildcard format, the file should be directly transferrable, 
but if as mine was, all newsgroups lines were regex format, you'll have 
some editing to do.

That said, I took the opportunity to vastly simplify my scores, so that 
hundreds of individual scores were combined into now, just 6 scores in 2 
scoring sections, according to the pan log.

Here's the official scorefile docs for both slrn and xnews:
http://www.slrn.org/docs/score.txt
http://xnews.remarqs.net/scoring.txt

Again, the pan format is now very close to the slrn format, except that 
pan's scorefile is case insensitive and (AFAIK) doesn't include the fancy 
stuff like file includes.  Also, while the slrn scoring system allows 
tests on any header tho it encourages use of overview headers only, pan 
/only/ allows overview header testing.  Others will be ignored... 
unfortunately.

Here's a quick (edited for posting) example taken from my scorefile, with 
comments, to illustrate compound scoring, which as I said, allowed me to 
condense well over a hundred scores down to just six in two sections:

% PAN scorefile
% Very close to SLRN's format at.
% http://www.slrn.org/docs/score.txt
% but with case insensitivity (not other differences) from
% xnews at http://xnews.remarqs.net/scoring.txt

% [newsgroup.*] wildcard (not regex) format (~ negates).
% header lines regex. (~ negates).
% Score conditions, single : and, double :: or.
% Expires: immed. below score if present.
% Leading % indicates comment
% Leading whitespace and blank lines ignored.
% Regex and newsgroup matches case insensitive with
% keyword:, sensitive with keyword=.
% Newsgroup change delimits section,.
% Score delimits "rule", multiple rules per section allowed.
% Comment after score becomes rule "name".

% Score levels: <=-9999 kill, -9998 to -1 low,
%               0, 1 - 4999 med, 5000 - 9998 high, >=9999 watch

%########################################################################
%########################################################################
[alt.*]
Score:: =-9999 %Alt kill
<------>From: ^karlz <address@hidden>$
<------>From: Seeking teens
<------>From: teens seeker
<------>From: triki
<------>From: ^LoLiTa <
<------>From: ^GOBLIN <
<------>From: ^moe <address@hidden>$
<------>From: sex coed

<------>Subject: adult movies
<------>Subject: dupped
<------>Subject: ^\([-0-9/]*\)
<------>Subject: Use critical pack from Microsoft Corporation
<------>Subject: R/-\\PE
<------>Subject: R/-\|PE
%########################################################################
%########################################################################
[cox.*]
Score:: =9999 %Cox Watched (Cox employee)
<------>From: <address@hidden>$
<------>From: CoxTech1
<------>From: ^David Knight <address@hidden>$
Score:: 100 %Cox Med
<------>From: ^Conrad J\. Sabatier <address@hidden>$
<------>From: ^Jim Rusling <address@hidden>$
<------>From: ^Todd Knarr <address@hidden>$
Score:: 5000 %Cox Hi
<------>From: ^Lenroc <address@hidden>$
<------>From: ^Mag.. 2.... <address@hidden>
Score:: =-9999 %Cox Kill (repeat-kill)
<------>From: ^"John Smith" <address@hidden>$
<------>From: John Shocked
<------>From: You Got Punked\, Bitch
%########################################################################

Score:: =-9999
<------>%Score created by Pan on Thu Apr 26 01:59:31 2007
<------>Expires: 10/29/2007
<------>From: ^"snake plisken" <address@hidden>$

<------>%Score created by Pan on Wed Jul 25 10:58:05 2007
<------>Expires: 1/27/2008
<------>From: ^common_ address@hidden
%########################################################################
%########################################################################

Obviously, a leading % indicates a comment, and you can see I've used 
that to good effect.

The newsgroup lines form the sections.  I was able to combine everything 
into just two, the alt.* scores and the cox.* (Cox being my ISP) scores.  
You may have additional sections if you subscribe to groups in multiple 
hierarchies.

Each score line delimits a rule.  Scores can have multiple conditions, as 
mine do. A single : ANDs the conditions, but I wanted to OR them, 
matching if ANY were true, thus the double ::.  As you can see, I grouped 
all the commonly scored tests together, thus the form a single "score".

It's worth noting the blank lines in the middle of the scores, as between 
subject and author above.  That's fine.

I dislike all the extra comments pan puts in.  They are mostly just extra 
noise for me, so as you can see, I eliminated most of them.  On the two 
"temporary" entries (single score line so single score) at the bottom, 
now expired, I kept the create date as pertinent since they had an 
expiry.  The others are permanent, so needed no create date info.

The double comment-hash lines at the bottom are there to keep any new 
scores I add, that I've not yet edited, separate from the others.  That 
way it's easy to go in and put them where they belong later, when I 
decide to hand edit the file again.

Other than the scorefile, nearly everything else is different.  Most of 
it needed to be as the automated multi-server handling changed the rules 
enough that the old formats didn't make a lot of sense any more.  The 
other exception (that I recall) is the cache format, which is the same.  
If you have a huge cache, you can carry it over.

Talking about which... there are a number of "undocumented" options 
available in new-pan only by editing the config directly -- that is, they 
aren't available in the GUI.  One of these is cache size.  I download to 
cache, then save off from there, so the default 10 MB cache size is way 
too small for me.  I use a multi-gigabyte cache size, changing the 
appropriate line in preferences.xml.

It's also possible to get more than four connections per server now, by 
editing the appropriate entry in servers.xml.  pan sticks to GNKSA which 
only allows four per server in the GUI, but some pay servers allow eight 
connections, for example, and that's now possible by editing the config 
directly.  Similarly, the expire is tracked in days in servers.xml.  The 
GUI limits you to only a few choices, but you can put whatever number of 
days you want by editing the file directly.

Finally, many people find the new single list of groups hard to work 
with.  While that's coded in, there's a workaround.  Pan honors the 
PAN_HOME environmental variable if set, so it's possible to setup 
multiple separate pan instances, each with its own settings, kept in 
different dirs.  Here, I have three instances, text, binary, and test.  
Others may find movies, tv-shows, etc, work for them, and some may wish 
to split out their porn from everything else, especially if they have 
kids (or Moms) around.  I created launcher scripts (pan.text, pan.bin, 
etc) that set the variable to point to the appropriate config, and then 
created kmenu entries for each launcher script, instead of having just 
the single pan entry.  (Users with a separate porn config may wish to 
keep that one out of their menu... only those who type it in correctly in 
the open dialog or terminal window will get the porn instance.)

HTH! =8^)

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