1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
|
-*- text -*-
The purpose of this FAQ is to provide answers for commonly asked questions
about slrn score files. Some of the questions are based on a similar FAQ
for the rn newsreader.
Questions:
1. How do I set up slrn to read a score file?
2. What is the format of an slrn score file?
3. How do I assign a score to a specific subject, e.g., ``test'' messages?
4. How do I score postings from a specific person?
5. How do I score articles from a specific site?
6. How do I score followups?
7. How do I kill cross posts from a specific group?
8. How do I score all cross-posts?
9. I know how to kill posts from a specific person. How do I make it so I
read _only_ the posts from a specific person?
10. How do I score articles that have no references line but whose subject
line starts with ``Re:''
11. How do I score subject headers that contain only uppercase characters?
Answers:
------------------------------
Subject: 1. How do I set up slrn to read a score file?
In order for slrn to read a score file, it must know the name of the
score file. This is specified by putting the appropriate line in your
.slrnrc file. For example, if the name of the score file is `Score' and
it is located in the News subdirectory, then add the line:
scorefile "News/Score"
to your .slrnrc file.
------------------------------
Subject: 2. What is the format of an slrn score file?
The format is simple. It consists sections that scores that are to be
applied to one or more newsgroups. Each section must start with a line
that contains the name of the newsgroup, enclosed in square brackets,
for which the scores defined by that section apply.
For example, a line of the form:
[sci.physics.*]
indicates the beginning of a section of scores for the sci.physics
hierarchy of newsgroups.
Individual scores of a section start with the `Score' keyword. It
indicates how many points are to be awarded to the article if it passes
the test defined by the score. For example,
Score: 100
Subject: neutrino
defines a score of 100 points to an article if the subject contains the
word `neutrino'.
It is also possible to score an article based on more than one header.
For example,
Score: 1000
Subject: path integral
From: Richard Feynman
gives an article a score of 1000 if the subject is about path integrals
and the author is ``Richard Feynman''.
A score of -9999 is a special score. If an article scores this value on
a given test, any other tests for the article will be skipped and the
article will be killed.
If the first character of a score is `=', the article will given the
score and the rest of the tests will be skipped. For example,
[sci.physics.*]
Score: =1000
From: @space.mit.edu
Score: -9999
Xref: astrology
defines two tests for the sci.physics hierarchy of newsgroups. Since
the first score starts with the `=' character, any article that whose
author's email address contains `space.mit.edu' will be given 1000
points and the rest of the tests will be skipped. The second test
assigns a score of -9999 to any article cross posted to an astrology
newsgroup. Since the score defined by this test is -9999, the article
will be killed. Together these two tests indicate that any article
cross posted to an astrology newsgroup is killed except if the author is
from space.mit.edu in which case the article is awarded 1000 points.
The `~' character may used used as a NOT operator. For example, the
previous score can (almost) be written:
[sci.physics.*]
Score: -9999
~From: @space.mit.edu
Xref: astrology
This simply says to kill any article that was cross posted to an
astrology group UNLESS the author is from space.mit.edu.
Finally the ``Score'' keyword can be followed by 2 colons to indicate
that any the score is awarded to the article if any of the tests defined
by the score are passed. For example,
Score:: 1000
Subject: neutrino
Subject: fermion
assigns a score of 1000 to an article if its subject line contains
either neutrino or fermion.
------------------------------
Subject: 3. How do I assign a score to a specific subject, e.g., ``test'' messages?
Score: -9999
Subject: test
------------------------------
Subject: 4. How do I score postings from a specific person?
Score: -9999
From: name@who\.knows\.where
assigns a score of -9999 to the person name@who.knows.where.
------------------------------
Subject: 5. How do I score articles from a specific site?
Score: -9999
From: @who\.knows\.where
will give a score of -9999 to an From line that contains
`@who.knows.where'.
------------------------------
Subject: 6. How do I score followups?
Assume a followup either contains a subject starting with `Re:' or has a
references header. 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 EITHER subjects that begin with
`Re:' OR have a references line.
To score articles with BOTH subjects with `Re:' AND a references headers,
use the single colon form:
Score: -9999
Subject: ^Re:
References: .
Single colon forms are AND expressions.
------------------------------
Subject: 7. How do I kill cross posts from a specific group?
You have two choices: either use the `Xref' header or the `Newsgroups'
header. It is best to avoid the `Newsgroups' header if possible, that
is, try to use the Xref header.
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: astrology
Again, try to avoid using the last form if possible.
------------------------------
Subject: 8. How do I score all cross-posts?
Like the previous answer you have two choices: to use the Xref header
(preferred) or the Newsgroups header. 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 header, use:
Score: -9999
Newsgroups: ,
------------------------------
Subject: 9. I know how to kill posts from a specific person. How do I make it so I
read _only_ the posts from a specific person?
The answer is simple: kill posts by everyone else. Assume that you want
to only read posts by someone whose from line contains: someone@i.like.
Then use a score of the form:
Score: -9999
~From: someone@i\.like
Note the use of the NOT indicator (~).
Subject: 10. How do I score articles that have no references line but whose
subject line starts with ``Re:''
Define a score based on the references header and the subject headers,
e.g.,
Score: -9999
~References: .
Subject: ^Re:
Here the the references line simply says that the article must NOT have a
references header. The subject header uses a regular expressions 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, use \C.
11. How do I score subject headers that contain only uppercase characters?
Use something like:
Score: -9999
~Subject: \c[a-z]
This will assign a score of -9999 to any article whose subject header
does NOT contain a lowercase character. To also kill followups to such
articles use:
Score: -9999
Subject: ^Re: \c[^a-z]*$
Subject: ^Re: \c.*[A-Z]
The last one says that the article will be killed if the subject
satisfies the two conditions:
1. It begins with "Re: " and the rest of the line does not
contain a lowercase character.
2. It begins with "Re: " and contains an uppercase character
somewhere on the remaining part of the line.
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.
|