Non-interactive scoring using shell scripts.
[This document needs a lot of work, especially to explain to non-UNIX experts.]

	Strn can run in a non-interactive mode where scores are
calculated and saved for a set of newsgroups.  This feature can be
used to greatly improve interactive response time by calculating and
saving the scores when the user is not reading news.  Strn can run from
from a "cron" or "at" job when the user is not reading news (like 6am),
and the scores will be saved for later (when the user wants to read news).

	The easiest way to use this feature is to write a shell script
and a new configuration file.  Here is a sample shell script:
(call it score.csh).
----- cut -----
#!/bin/csh -f
touch ~/strn_log
date >> ~/strn_log
setenv STRNBG TRUE
setenv BG_GROUPS '^gnu.* ^news.* usenet program'
strn >>& ~/strn_log < /dev/null
date >> ~/strn_log
----- cut -----

Make the score.csh file executable ("chmod u+x score.csh")

	The list after BG_GROUPS consists of newsgroup patterns to
score.  The '^' (beginning of line) and '$' (end of line) characters
can be useful when you want a specific group, and not others with a
similar name.  (For instance, ^news.groups will not match
de.news.groups, and rec.pets.lemurs$ will not match
rec.pets.lemurs.forsale.)  The BG_GROUPS line can contain up to
1000 characters.  Backslash continuations are not supported.

	For longer lists of newsgroups, named lists can be used.
This is probably easiest to understand with an example.  Here is
a sample shell script with a longer list:

----- cut -----
#!/bin/csh -f
touch ~/strn_log
date >> ~/strn_log

setenv STRNBG TRUE
setenv SYSTEMS '^comp.sys.* alt.sys.*'
setenv COMPUTERS '(SYSTEMS) comp.arch comp.sources.*'
setenv RELIGION 'talk.religion.* alt.religion.* soc.religion.*'
setenv PLAY 'rec.humor rec.skydiving'
setenv LOCAL 'local.*'
setenv BG_GROUPS '(COMPUTERS) (RELIGION) (PLAY) (LOCAL)'

strn >>& ~/strn_log < /dev/null
date >> ~/strn_log
----- cut -----

	The values are used by putting '(' and ')' around a variable name.
Named lists can be nested--see the example above.

	After setting up these files you can just execute score.csh,
or use the "at" command to execute score.csh at a particular time.
For example, you can type
score.csh
...to score the listed groups now, or
at 6am score.csh
...to score the groups at 6am

[Should I go into how to set up a repeating at-job?]

	When using the script above, strn will write some logging
information to the file strn_log in the home directory.  This
information usually looks like this:
----- cut -----
Mon May  3 19:01:19 MDT 1993
Unread news in unm.test                                     2 articles
Unread news in comp.risks                                   1 article
Unread news in comp.sys.amiga.games                       347 articles
Unread news in news.announce.newgroups                     41 articles
Unread news in comp.sources.testers                         4 articles
etc.

comp.risks: (load) (1 saved, 1 new)
comp.sys.amiga.games: (load) (347 saved, 18 new)
news.announce.newgroups: (load) 
[Many lines deleted]
alt.quotations: (load) (136 saved, 15 new)
comp.os.386bsd.announce: (load) 
End of runback.

Mon May  3 19:37:23 MDT 1993
----- cut -----

	You should check the log file occasionally for error messages,
or anything that looks unusual.  Strn will try to handle errors when
running in the background.

Notes:
	* Be careful not to use strn or another newsreader
interactively while strn is scoring non-interactively.  Strn uses a
lock file, but I don't like to trust lock files.

	* When in runback mode strn may take a long time before
scoring the first named newsgroup.  This is because it compiles
all the regular expressions in BG_GROUPS when strn starts.
