Scoring is a method to give articles a score based on user-defined rules. The idea behind this is to give articles with a high score a higher priority while articles with a low score (less than zero) are marked as read.
When entering a group, all articles are given a score of ``0''. Then the list of scoring rules, the ``scorefile'', is applied to each article. The scorefile might give articles from ``John Doe'' a higher score, while articles with the word ``Gnus'' in their subjects get a negative score. More than one rule may apply cumulatively to the same article.
In the end, threads with high-score articles appear at the top of your screen and can be read before other, possibly less interesting, articles.
slrn has no killfile, but the same effect can be achieved with its
scorefile. Assigning a particularly low score will do the trick:
[news.software.readers] Score: =-9999 % I'm not interested in articles on gnus Subject: gnusIn this example, all articles in news.software.readers that have the substring ``gnus'' in their Subject lines are assigned a negative score. The equals sign before the score value tells
slrnto assign the score -9999 and to skip all other tests for the affected article; otherwise, the score would be added to the score value of all previous matching rules and subsequent rules could increase the score again.
If the score of an article is equal to or less than kill_score (which happens to be -9999 if you didn't change it), the article does not even get displayed, so the above scoring rule effectively killfiles all articles that have ``gnus'' in their subject line.
slrnto read a scorefile?
In order for
slrn to read a scorefile, it must know the name of the
scorefile. This is specified by putting the appropriate line in your
slrnrc file. For example, if the name of the scorefile is ``
and it is located in the ``
News'' subdirectory, then add the line:
set scorefile "News/Score"to your slrnrc file.
The format of
slrn's scorefiles is described in the file
which is part of the documentation that comes with the source package. That
file also contains some examples.
slrn's regular expressions?
slrn makes use of the regexp engine built into the S-Lang programmer's
library. Thus, a full description of the regexp syntax that can be used in
slrn's scorefiles can be found in the documentation of S-Lang. In version
2.1, this is chapter 22 of the file
available online). Please note that in
slrn, the default is \C (case
insensitive), not \c.
The grep-like utility
rgrep that comes with the editor
jed uses the
same regexp engine as
slrn, so you can use it. Alternatively, Matthias
Friedrich wrote a small program that can be used to make such tests. He posted
the source to de.comm.software.newsreader (Message-ID is
<email@example.com>); you can get the article from
Editing the scorefile and adding entries manually can become quite
time-consuming if you want to score on threads or authors regularly. The
create_score (default binding is ``
article mode) makes it easy to create a new scorefile entry based on the
currently selected article.
If you want to watch or kill subthreads via a single keystroke, you may like the ``one-key scoring macro'' that is available from the macro section of the slrn website: <http://slrn.sourceforge.net/macros.html>.
Using the ``
Expires:'' keyword, you can specify that a certain scoring
rule should only be valid until a given date. After that,
slrn ignores it
and will warn you on startup, but does not remove the entry from the
scorefile. If you often use this keyword, expired entries will clutter up your
scorefile and make it difficult to read.
Fortunately, Felix Schueller wrote a perl script called
can remove expired entries from your scorefile automatically for you. On
Unix-like systems, it can even be called as a cron job, so you don't need to
worry about expired entries at all.
cleanscore is included in the
contrib directory of
slrn's source distribution and can also be
downloaded from the slrn website:
The most simple version is
Score: -9999 Subject: testThis matches all ``Subject'' lines which contain the substring ``test'' case insensitively. The above matches ``test'', ``TEST'', ``teSt'',``Kerneltest'', ``protesting'', etc.
In order to limit this to all ``Subject'' lines containing the word ``test'' rather than the substring use this:
Score: -9999 Subject: \<test\>The following will score articles whose ``Subject'' line is exactly ``test'':
Score: -9999 Subject: ^test$Finally, a score entry that filters all test-postings to non-test groups:
[~*.test] Score: -9999 Subject: ^test$
The following rule
Score: -9999 From: name@who\.knows\.whereassigns a score of -9999 to the person with the email address ``firstname.lastname@example.org''.
Score: -9999 From: @who\.knows\.wherewill give a score of -9999 to a ``From'' line that contains ``@who.knows.where''. An alternative would be to score on the Message-ID header field:
Score: -9999 Message-Id: @who\.knows\.where>
We're assuming that a followup contains a ``Subject'' line starting with ``Re:'' and/or has a ``References'' header line. To assign a score of -9999 to such an article use:
Score:: -9999 Subject: ^Re: References: .Note the use of the double colon following the score keyword. This indicates that the score is an OR type expression. This means that the above score will pick out articles with subjects that begin with ``Re:'' OR have a ``References'' line (OR both).
To score articles that have both a ``Subject'' line starting with ``Re:'' and a ``References'' header line, use the single colon form:
Score: -9999 Subject: ^Re: References: .Single colon forms are AND expressions.
Scoring followups to your own postings is quite easy if
the Message-IDs of your articles (see the question on
generating Message-IDs for details). In this case, all you have to do
is to look for
email@example.com in the ``References'' header
line. Of course, you need to replace
with the strings that are correct for your setup - if in doubt, look at the
Message-ID of one of your own articles to find out.
Score: 1000 References: username@your\.hosts\.fqdn>Note that this will catch articles that reference one of your articles directly or indirectly (e.g. a followup to a followup to your article). If you only want to score direct followups, make sure to check the last ID in the ``References'' header line only (note the trailing dollar sign):
Score: 1000 References: username@your\.hosts\.fqdn>$
You have two choices: either use the ``Xref'' header line or the ``Newsgroups'' header line. If possible, you should avoid the ``Newsgroups'' line in your scorefiles, as it is usually not included in the NOV (news overview) data, so retrieving it requires extra server communication that may slow down scoring (and thus entering groups) significantly. So if your server provides ``Xref'' header lines, use them.
Assume that you want to score any article that was cross-posted to an ``astrology'' newsgroup. Then use one of the following forms:
Score: -9999 Xref: astrology Score: -9999 Newsgroups: astrologyTo say it again, the latter version is usually much slower, and should be avoided whenever the necessary pattern is available from ``Xref''.
Like the previous answer you have two choices: to use the ``Xref'' line (preferred) or the ``Newsgroups'' line. The first choice uses the fact that a cross-posted article will have two colons in the ``Xref'' header field. So, use a score of the form:
Score: -9999 Xref: :.*:If you do not have the option of using the ``Xref'' line, use:
Score: -9999 Newsgroups: ,However, you may want to tolerate cross-posts if a ``Followup-To'' header line is set. The following rule scores articles that are cross-posted into many groups (e.g. more than 2) and have no ``Followup-To'' line (note that this rule is ``expensive'', as usually neither ``Newsgroups'' nor ``Followup-To'' are included in the NOV data).
Score: -9999 Newsgroups: ,.*, ~Followup-To: .
The answer is simple: kill articles by everyone else. Assume that you want to read only articles by someone whose ``From'' line contains: ``firstname.lastname@example.org''. Then use a score of the form:
Score: -9999 ~From: someone@i\.likeNote the use of the NOT indicator (~).
Define a score based on the ``References'' line and the ``Subject'' line, e.g.,
Score: -9999 ~References: . Subject: ^Re:Here the ``References'' pattern simply says that the article must not have a ``References'' line. The ``Subject'' pattern uses a regular expression that says ``Re:'' must occur at the beginning of the ``Subject''. This will match the strings ``Re:'', ``re:'', ``rE:'', and ``RE:''. To match only ``Re:'', use the regular expression
Subject: ^\cRe:Here, ``\c'' turns on case-sensitivity. To turn it off (which is the default), use ``\C'', e.g.:
Use something like:
Score: -9999 ~Subject: \c[a-z]This will assign a score of -9999 to any article whose ``Subject'' header line does not contain a lowercase character. If you also want to kill followups to such articles use:
Score: -9999 Subject: ^Re: \c[^a-z]*$ ~Subject: ^Re: *The last one says that the article will be killed if the ``Subject'' satisfies the two conditions:
The last constraint is necessary to avoid killing articles that are followups to articles with an empty ``Subject'' line. Of course, one might want to kill such articles as well.
Some people dislike posters who don't post under their full real name. Of
slrn has no way of knowing whether a given name is a real name or
not; however, a name that does not contain a space is most probably not a full
real name, so a commonly used rule is to check for the ``From'' header line to
contain at least two spaces (one inside the name and one between the name and
the address), separated by non-blank characters:
[*] Score: -9999 ~From: [ ]+[^ ]+[ ]+