Turnpike Offline (SCORE Overview)

20010225 David Sanderson

With acknowledgements to Howard Fisher, on whose posting of March 1997 in the newsgroup demon.ip.support.turnpike this article is based.
Having spent a couple of afternoons (and then some) exploring the facilities of SCORE, the information on this page is an extraction and expansion of Howard's original notes. A judicious amount of polishing has been done following suggestions from Wm... (he of UWISH).

SCORE is an undocumented and un-supported facility buried in the coding of the Turnpike Offline program which enables the marking and sorting of threads and articles in newsgroups and pseudo-newsgroups. This is in addition to the 'Interesting' and 'Not Interesting' thread classification markers already provided by Turnpike Offline.

There is a link to a model SCORE file which contains some sample action strings that should be replaced by those which meet your own requirements, and the basics of 'scoring' as a reminder.

This file will be updated and refined as and when further knowledge comes to light.
Minor alterations in wording to give more precise meanings. Notes added to the 'context descriptions' regarding thread subject changing mid-stream.
Added comment in :i - Ignore articles re 'Ignore' and 'Kept' for same article.
Added comments, and an additional example, for mixing 'context' letters in the same action line.

General Notes on the Usage of SCORE

To make use of this facility, a simple text file with the name of SCORE (no file extension) is composed based on these notes, and placed in the \turnpike\usrxxx directory.
On multi-user versions of Turnpike it should be possible for each seat to have its own independent SCORE file in the directories \usr001, \usr002 etc., but this usage has not been tested.

Each time that the Turnpike Offline program is opened, SCORE is read, and the syntax of each active line is checked apparently by the coding that checks any custom rules, as the same error flash pops up should any failing be found in the syntax.
This also means that to test the effectiveness of any new action string, Turnpike Offline has to be shut down and then re-opened before the new string is activated.
Hopefully, threads and articles in both fully downloaded and browse-only newsgroups will then be marked as required when a newsgroup is opened for reading.

On not-so-fast machines, using the SCORE facility does seem to make the opening of news-stands a slower process. When testing a new action line, I have found that it can help if an empty 'trial' news-stand is set up, temporarily add the newsgroup concerned, and do the testing there.

An active, or action line in SCORE, is any line not preceded by a semi- colon ";".
It is strongly recommended that all strings in the SCORE file, whether active or parked, are accompanied by remark lines (each preceded by a semi-colon ";") which explain the function of each action line.

Bear in mind that 'global' action lines not made specific to a subscribed newsgroup will impact upon every subscribed newsgroup, and adding a new action line to an existing SCORE file may have undesired effects on any existing 'scoring'.
Thankfully, the effects of SCORE are not permanent. If problems are experienced, then commenting out all or some of the action lines with a semi-colon ";", or temporarily renaming the SCORE file, will restore everything to normal the next time Turnpike Offline is opened.

When 'scoring' takes place, the sorted order of any threads previously marked with the classifications 'Interesting' or 'Not Interesting' is not altered in an opened newsgroup. The marking of 'Interesting' and 'Not Interesting' threads takes precedence over any 'score' markings.

The order after 'scoring' being:
  1. Threads classified as 'Interesting' and containing unread articles
  2. Threads 'selected' by Score containing unread articles
  3. Any other (including 'deselected') threads containing unread articles
  4. Threads classified as 'Interesting' (all articles read)
  5. Threads 'selected' by Score (all articles read)
  6. Unmarked threads (all articles read)
  7. Threads classified as 'Not Interesting'
If a thread classified as 'Interesting' and 'scored' to be 'selected' is then declassified, the marker in the left-hand box of such threads reverts to declassified. 'Refreshing' the newsgroup, using the button in the bottom right hand corner, will reinstate the 'selected' marker and sort the thread accordingly.

The Syntax of Action Lines in SCORE

The basic format of an action line in SCORE is:



NOTE: The testing that I have done seems to indicate that any character (except :s, :d, or :u), including no character e.g. '/faq/s:', results in the 'ignore' action being implemented. It would seem safer to use ":i" for 'ignore' so that the intention of the action line is apparent.

Actions ":s" and ":d" affect whole threads.
Actions ":i" and ":u" affect individual articles.

The /text/context phrase can be repeated, joined together by & (and), | (or), and can be negated by ! (exclamation).
Parentheses ( ) can also be used for grouping parts of strings.
It is also possible to mix 'contexts' in the same action line - see example 15.

Usage of meta-characters and the meaning of shorthand escaped characters.
 |  - or
 ^  - start of string
 $  - end of string
 *  - 0 or more of the previous character
 +  - 1 or more of the previous character
 ?  - 0 or 1 of the previous character
 .  - match any character
 \  - used to escape a meta-character
[ ] - matches any one of the enclosed characters
[^] - matches any one character except those enclosed
 -  - specifies a range for use within [ ]
( ) - grouping

 \d - a digit, equivalent to [0-9]
 \D - not a digit, equivalent to [^0-9]
 \w - a word character, equivalent to [a-zA-Z0-9_]
 \W - not a word character, equivalent to [^a-zA-Z0-9_]
 \t - a tab
 \s - a space or a tab, equivalent to [ \t]
 \S - not a space or a tab, equivalent to [^ \t]
 \n - line feed
 \r - carriage return
 \f - form feed

To avoid false positives when looking for a character string 'def', which may also be embedded within another, then
/^def[^a-z] | [^a-z]def[^a-z] | [^a-z]def$/
will prevent instances of 'defghi', 'abcdefghi' or 'abcdef' being matched, either at the start of the line, mid-line, or at the end of the line.
The above expression could also be written effectively as
where \W (capital W) is the equivalent of [^a-zA-Z0-9_] - not a word character.

Examples of Action Lines in SCORE

Examples 1 - 8 illustrate action lines that would apply to every newsgroup subscribed to, including mailing lists converted to newsgroups.
Examples 9 and on show how actions can be limited to only one, or some of the newsgroups subscribed to.
Each of the Examples was tested independently of any other to check the stated results (Turnpike 3.04, Windows3.1). I shudder to think what the effects might be should all these Examples be let loose in a SCORE file simultaneously.

Example 1
; In any newsgroup -
; select/promote threads with 'announce' or 'faq' in Subject:

Example 2
; In any newsgroup -
; ignore articles with 'robotic', 'usr', or '56' in Subject:

Example 3
; In any newsgroup -
; select/promote threads containing author 'smith' or 'jones'

Example 4
/usr|robotic|56/s & !/smith|jones/n:i
; In any newsgroup -
; ignore all articles with 'usr', 'robotic' or '56' in Subject:,
; but do not ignore any such articles written by 'smith' or 'jones'

Example 5
; In any newsgroup -
; select/promote threads with 'modem' in Subject:
; do not select/promote any threads containing 'flash', 'usr' or
; 'winmodem' in Subject:

Example 6
/john smith/n:i
; In any newsgroup -
; Selects/promotes any  thread with 'announce' in the Subject: line.
; The second line will ignore any articles written
; by 'John Smith', even in selected 'announce' threads.
Note: If the action line in Example 1 already existed in the SCORE file, then the first line of this Example would not be needed.
Example 7
/john smith/n:s
; In any newsgroup -
; Selects/promotes any thread containing an article by 'John Smith',
; All articles with 'announce' in Subject: will be ignored,
; even those written by 'John Smith'.

Example 8
/usr|robotic|56/s & !/smith|brown/n:i
; In any newsgroup -
; Selects/promotes any thread containing an article by 'Smith'
; or 'Brown'.
; The second line will ignore all articles with 'usr',
; 'robotic', or '56' in the Subject: except those written by
; 'Smith' or 'Brown'.

Example 9
/!announce/g & /smith/n:i
; In mailing list pseudo-newsgroup !announce -
; ignore articles written by 'smith'

Example 10
/demon\.ip\.support/g & /smith/n:s
; In d.i.s.* -
; Selects/promotes any thread in demon.ip.support,
; demon.ip.support.pc, or any other
; demon.ip.support.* newsgroup with articles by 'smith'.
; If more than one of the above groups is subscribed to,
; then promotion takes place in each group.
Note: This could also be written as /demon/g & /smith/n:s which then affects any of the 'demon*' hierarchy newsgroups that may be subscribed to.

Example 11
/^demon\.ip\.support$/g & /smith/n:s
; In d.i.s. -
; Selects/promotes any thread with articles by 'smith' only
; in demon.ip.support.
; Articles written by 'smith' also appearing in demon.ip.support.pc,
; demon.ip.support.turnpike etc. will not be promoted
; in these subscribed groups.
Note: By surrounding the newsgroup expression with "^" (start of string), and "$" (end of string), the action is limited to the one newsgroup demon.ip.support, even though there may be other demon.ip.support.* newsgroups in the subscribed list.
Example 12
/demon\.tech\.modems/g & /usr|robotic/s:s
/demon\.tech\.modems/g & /56/s:d
; In d.t.m -
; Selects and promotes any thread that contains 'usr' or 'robotic'
; in the Subject:.
; Any thread which also has '56' in the Subject: will not be
; selected/promoted (deselected) and will be sorted normally.

Example 13
/soc\.genealogy\.surnames\.britain/g & (/.*/ & !/faq/)s:i
/soc\.genealogy\.surnames\.britain/g & /sanderson|holland/s:s
/soc\.genealogy\.surnames\.britain/g & /sanderson|holland/s:u
/soc\.genealogy\.surnames\.britain/g & /(^|\W)ward($|\W)/s:s
/soc\.genealogy\.surnames\.britain/g & /(^|\W)ward($|\W)/s:u
/soc\.genealogy\.surnames\.britain/g & /(^|\W)king($|\W)/s:s
/soc\.genealogy\.surnames\.britain/g & /(^|\W)king($|\W)/s:u
; In s.g.s.b. -
; The first line ignores every article in the newsgroup except those
; in threads with 'faq' in the Subject: line.
; The subsequent lines promote/select and unignore those articles
; which have the names 'sanderson', 'holland', 'ward', or 'king'
; in the Subject: line of s.g.s.b. The format of the 'ward/king'
; lines is to avoid false positives as discussed earlier.
Note: If an earlier line in the SCORE file has been used to globally 'select/promote' all threads with '/faq/s:s' then the '& !/faq/' in the first line is needed to 'not ignore' a thread with 'faq' in the subject, even though it would still have been promoted in this newsgroup (Assuming you want to see 'FAQs' in this newsgroup).
Example 14 (A variation of Example 13)
/britain/g & (/.*/ & !/faq/)s:i
/britain/g & /sanderson|holland|(^|\W)ward($|\W)|(^|\W)king($|\W)/s:s
/britain/g & /sanderson|holland|(^|\W)ward($|\W)|(^|\W)king($|\W)/s:u
Note: If the newsgroup of interest is the only one subscribed to with 'britain' appearing in the newsgroup name, then this example is effectively the same as Example 13.
Example 15
/demon\.tech\.modems/g & /(robotics|usr|56|90|x2)/ & !(/faq/s|/Turnpike Modem Support/n):i
; in d.t.m -
; Ignores any article with 'robotics' or 'usr' or '56' or '90'
; or 'x2' in the Subject:, except for
; articles with 'faq' in the Subject: or 'Turnpike Modem Support' as
; the Author's name.

[ Turnpike SCORE Overview ]

[ Demon FTP Directories | WS_FTP 16-bit Guide ]
[ Demon/TPke Timouts | Turnpike Tagging ]
[ Turnpike Call Costs | Turnpike News Archive/Paths ]
[ Turnpike SCORE Model ]
[ Turnpike Linkfile ]

[ Thor2ru Home Page ]

Hidden Counter