home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / SLRN_CP / SCORE.TXT < prev    next >
Text File  |  1996-12-09  |  6KB  |  161 lines

  1. Basic Idea:
  2.  
  3.   slrn awards an article points by giving it a score.  If the score for the
  4. article is less than zero, the article is marked as read or killed.  The
  5. purpose of the score file is to define the set of tests that an article must
  6. go through to determine the score.  Although the score may be based on ANY
  7. header item, it is recommended that one stick with the following for
  8. efficiency:
  9.  
  10.       * Subject
  11.       * From
  12.       * Xref
  13.       * References
  14.       * Lines
  15.       
  16. as well as the newsgroup that the article is part of.
  17.   
  18. Score file format:
  19.  
  20.   The format of the file is very simple (See below for an explicit
  21. example). The file is divided into sections delimited by a newsgroup
  22. or newsgroups enclosed in square brackets, e.g.,
  23.  
  24.      [rec.crafts.*, rec.hobbies.*]
  25.  
  26. The name may contain the `*' wild card character.  
  27.  
  28. Comments begin with the `%' character.  Leading whitespace is ignored.
  29.  
  30. Each section consists of comment lines, empty lines or keyword lines.
  31. Only the keyword lines are meaningful and all leading whitespace is
  32. ignored.  A keyword line begins with the name of the keyword followed
  33. immediately by one or two colons and one space.  The rest of the line
  34. usually consists of a regular expression.  The keyword may be prefixed
  35. by the `~' character to signify that the regular expression should not
  36. match the object specified by the keyword.
  37.  
  38. A group of keywords defines a test that is given to the header of the
  39. article.  The `Score' keyword is used to assign a score to the header
  40. if the header passes the test.  It also serves to delimit tests.  The
  41. score can be any positive or negative integer.  However there are two
  42. special values: 9999 and -9999.  If the score for an individual test
  43. is one of these two values, any following tests are skipped and the
  44. article is simply given one of the two special values.  If the
  45. numerical value of the score is prefixed by an equal sign, score
  46. processing for the header is stoped and the header will be given the
  47. score for that test.
  48.  
  49. All keywords except for `Score' and `Expires' may be prefixed by the `~'
  50. character.  If the `Expires' keyword appears, it must immediately follow the
  51. `Score' keyword.  The `Expires' keyword may be used to indicate that the
  52. test is no longer to be applied on the date specified by the keyword.  For
  53. example,
  54.  
  55.     Expires: 4/1/1996              (or: 1-4-1996)
  56.  
  57. implies that the given test is no longer valid on or after April first 1996.
  58. As the example indicates, the date must be specified using either the format
  59. MM/DD/YYYY or DD-MM-YYYY.  Note: DO NOT CONFUSE THIS WITH THE EXPIRES HEADER
  60. KEYWORD.
  61.  
  62. The Lines keyword is also special.  Its value is not a regular expression,
  63. rather, a simple integer.  It may be used to kill articles which contain too
  64. many or too few lines.  For example,
  65.  
  66.     Score: -100
  67.     Lines: 1000
  68.     
  69. assignes a score of -100 to articles that have more than 1000 lines.
  70. Similarly, the test
  71.  
  72.     Score: -100
  73.     ~Lines: 3
  74.     
  75. assigns a score to articles that have less than or equal to 3 lines.
  76.  
  77. Here is a sample slrn score file:
  78. -------------------------------------------------------------  
  79.   [news.software.readers]
  80.      Score: 9999
  81.      % All slrn articles are good
  82.      Subject: slrn
  83.   
  84.      Score: 9999
  85.      % This is someone I want to hear from
  86.      From: davis@space\.mit\.edu
  87.  
  88.      Score: -9999
  89.      Subject: \<f?agent\>
  90.  
  91.   [comp.os.linux.*]
  92.      Score: -10
  93.      Expires: 1/1/1996
  94.      Subject: swap
  95.      
  96.      Score: 20
  97.      Subject: SunOS
  98.       
  99.      Score: 50
  100.      From: Linus
  101.      
  102.      % Kill all articles cross posted to an advocacy group
  103.      Score: -9999
  104.      Xref: advocacy
  105.      ~From: Linus
  106.      
  107.      % This person I want nothing to do with unless he posts about 
  108.      % `gizmos' but only in comp.os.linux.development.*
  109.      
  110.      Score: -9999
  111.      From: someone@who\.knows\.where
  112.      ~Subject: gizmo
  113.      ~Newsgroup: development
  114.   
  115.   [~misc.invest.*, misc.taxes]
  116.      Score:: -9999
  117.       Subject: Earn Money
  118.       Subject: Earn \$
  119.       
  120. --------------------------------------------------------  
  121.  
  122. This file consists of two sections.  The first section defines a set
  123. of tests applied to the news.software.readers newsgroups.  The second
  124. section applies to the comp.os.linux newsgroups. The final section
  125. applies to ALL newsgroups EXCEPT misc.invest.* and misc.taxes (see
  126. below).
  127.  
  128. The first section consists of three tests.  The first test applies a score
  129. of 9999 to any subject that contains the string `slrn'.  The second test
  130. applies to the `From'.  It says that any article from davis@space.mit.edu
  131. gets scores 9999.  The third test gives a score of -9999 to any article
  132. whose subject contains the word `agent'.  Since tests are applied in order,
  133. if an article contains both `slrn' and `agent', it will be given a score of
  134. 9999 since 9999 is a special score value.
  135.  
  136. The second section is more complex.  It applies to the newsgroups
  137. comp.os.linux newsgroups and consists of 5 tests.  The first three are
  138. simple: -10 points are given if the subject contains `swap', 20 if it
  139. contains SunOS, and 50 if the article is from someone named `Linus'.  This
  140. means that if Bill@Somewhere writes an article whose subject is `Swap, Swap,
  141. Swap', the article is give -10 points.  However, if the Linus writes an
  142. article with the same title, it is given -10 + 50 = 40 points.  Note that
  143. the first test expires at the beginning of 1996.
  144.  
  145. The fourth test kills all articles that were cross posted to an advocay
  146. newsgroup UNLESS they were posted by Linus.  Note that if a keyword begins
  147. with the `~' character, the effect of the regular expression is reversed.
  148.  
  149. The fifth test serves to filter out posts from someone@who.knows.where
  150. unless he posts about `gizmos' in one of the comp.os.development newsgroups.
  151. Again note the `~' character.
  152.  
  153. The final section of the score file begins with the line
  154.  
  155.   [~misc.invest.*, misc.taxes]
  156.  
  157. If the first chaarcter following the opening square bracket is `~',
  158. then the newsgroup or newsgroups contained in the brackets are NOT to
  159. be matched.  That is, the `~' character is used to denote the boolean
  160. NOT operation.
  161.