[Last updated 7/28/93 by Clifford A. Adams (caadams@access.digex.net)]

Scoring file and format reference

File locations:

[Note: if you have changed your private news directory with the -d
 command line option, substitute the new name for ~/News below.]

	Currently, score files are placed in the directory
"~/News/scores".  (You can use the environment variable SCOREGROUPS to
change this directory.)  Strn will automatically create this directory
if you edit a score file within strn.

	Score files are executed from the most general to the most
specific by group name.  For instance, for the group "sci.bio.fish"
the following score files would be tried in this order:

[first]		~/News/scores/global
		~/News/scores/sci
		~/News/scores/sci.bio
[last]		~/News/scores/sci.bio.fish

	The files ending with "sci" and "sci.bio" are also called
"hierarchy" score files since they will apply to any newsgroups
beginning with "sci" or "sci.bio"

**********
Scorefile format:

	The '#' character starts a comment.  Comments can only begin
at the start of a line.  Blank lines are also allowed.
---------- comment examples ----------
#comment

##### news.groups score file.
# This person is really great--give a big bonus.


	Scoring commands must begin at the start of a line.  They
consist of a standard keyword followed by any arguments to the command.
---------- score command examples ----------
killthreshold -30
exclude sci.bio
include %p/politics


	If a line is neither a comment nor a scoring command, it is
considered to be a scoring rule.  (Some syntax checking is done to
find incorrectly formatted scoring rules.)
The format of a scoring entry is:

scoredelta [freetext] header: match-text

Examples:

-12 From: luser@badplace.foo.net
^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
 |    |              \--- match-text
 |    \--- header
  \--- amount

27 pattern subject: ^re\:
^^ ^^^^^^^ ^^^^^^^^ ^^^^^
|    |       |       \--- match-text
|    |       \--- header
|    \--- freetext
\--- amount

Amount:
	The number of "points" to add to an article's score if the
match-text matches the appropriate header in the article.  (Negative
numbers take away points from the article.)  A '+' character is
optional before positive amounts.

Freetext:
	Zero or more keywords which change the interpretation of the rule.
Currently the only freetext keyword is "pattern" which tells strn to use
regular expression routines on the match-text.  (Later freetext keywords
may allow features like time-limited rules.)

Header:
	This field specifies which header to use when applying a rule
to an article.  This field must end with a ':' character.  (The ':'
character is what distinguishes the header from the freetext field.)
The header must be a known header name, which is either a standard header
(From, Subject, Newsgroups, and several more), or a header name declared
with the "header" command.

Match-text:
	This field contains either text or a regular expression (with
the "pattern" freetext).  For each article scored, the match-text is
compared with the contents the article's header line.  (The header to
use is specified in the "header" field above.)  Leading spaces in the
match-text are ignored, but *trailing spaces* (before the end of line)
are *not* ignored.
	If the freetext field contains the keyword "pattern", the trn
regular-expression routines are used to determine whether the
match-text matches the article's header line.  The regular expression
syntax is similar to that used in ed(1).  See the manual page for more
information.  A couple quick notes:  the '.' character is a special
character in 
	If the "pattern" keyword is *not* present, strn will use a
much simpler (and faster) rule for scoring articles.  A rule will be
applied (the amount will be added) to an article if match-text is a
substring of the article's header.  The substring matching is
case-insensitive.  A 
	There is one special case in the default matching rule.  When
matching "From" lines (authors), the wildcard character '*' may be
used ONCE in the match-text, and will replace any text.  (It will act
like the * wildcard usually does).  This wildcard allows easier
matching on authors that post from more than one machine at a site.
With other header lines the '*' character matches only the '*' character.
For instance, the score rule "+15 From: foo@*.mit.edu" will match the
header lines "From: foo@baz.bar.edu" and "foo@icky.bletch.bar.edu"

---------- score line examples ----------
-5 subject: flame
+2 Summary: The meaning of life revealed
7	from:		author@site.edu
-15   from:   loser@*.diploma.mill
#The following pattern matches lines that begin with re:
#(optional whitespace before re:).
-5 pattern subject: ^[ \t]*re:
