NEWNEWS.CMD - an ka9q compatible OS/2 nntp client
Copyright (C) 1995,1996 Alex Chapman <alex@budgetweb.com>

---
Introduction

This program is written in OS/2 Rexx and uses the RxSock DLL provided
in the rxsock.zip package on IBM Employee Written Software.

It is my first attempt to download news in the same format that ka9q/2
(or ka9q) does, but whilst logged on using SLIP.EXE.  This should allow
you to download news whilst using the other applications that are part
of the OS/2 WARP IAK.

As such, once you have modified the paths for nntp.dat, history, kill
and batch.txt it should be able to be used interchangeably with ka9q/2,
and in conjunction with whatever offline newsreader you presently use.

I have tested it with cppnews, which is an excellent DOS offline news
and mail reader.  This uses its own unbatching program (cppbatch) which
may respond differently to the batch.txt which I create than another
unbatcher.  If you have problems unbatching news, please try and get as
much diagnostic information as possible (if the unbatcher has parameters
that make it give verbose error messages, switch it on), and forward it
with a copy of batch.txt (try and make a small one which reproduces the
same error) to me (alex@budgetweb.com) and I will try and fix it.

Writing this in REXX has advantages and disadvantages.  Rexx is not the
speediest of languages, but neither is it sluggish.  And considering most
of the users will be downloading news over a 14400 modem, this program is
unlikely to be the bottleneck.  Also, the code can be examined freely by
users, and modified if they so desire.

If you do come up with a neat enhancement, please don't keep it to yourself.
Send the modified code to me, and I will look at including it in the next
release.

---
Installation

1 Copy rxsock.dll from rxsock.zip into os2\dll (in LIBPATH)
  RxSock is IBM Employee-Written-Software, and can be downloaded from
  <ftp://src.doc.ic.ac.uk/packages/os2/ibm/ews/rxsock.zip>

2 Copy rxmatch.dll from this package into os2\dll (in LIBPATH)
  RxMatch provides simple regular expression matching for kill file
  support.  The source is included in rxmatsrc.zip

3 Put newnews.cmd somewhere in your PATH

4 Put newnews.ini somewhere on your PATH and modify the settings to reflect
  your system setup

5 Run 'newnews' whilst offline, and it should report the newsserver
  and the date and time that news was last successfully retrieved,
  and then an error about host being unreachable.  You should be
  ready to connect and run it now.

---
Trouble shooting

* If you start this program from a dialing script run by SLIPPM, then
the output will be sent to the SLIPPM status window, which is difficult to
read.  To prevent this, use the /I parameter on the START command.

* Because newnews.cmd can sometimes leave .lck files around if it
fails, or is stopped, I have added an 'F' parameter which allows you to
force newnews to run even if the lock files exist, by first deleting the
lock files.  To use it you type 'NEWNEWS F'

* Stacked article requests are now available.  Read notes on version
0.27, or just try experimenting with the value of the stack in newnews.ini
6 seems to be a good value, and gives me about 25% improvement over
unstacked.  Your mileage may vary.

* I have implemented a max_articles variable so that you can restrict
the maximum number of articles that you ever want to download per session.
Setting this to -1 will disable the checking.

* Kill file support has been implemented, a very simple example of
a kill file which I use to discard articles with more than 99 lines is
included.  Refer to the documentation provided with DOS DIS for more
advice.  Briefly any regular expressions included in the KILL file found
to match any header line causes the rest of the article not to be loaded.
If a regular expression is prefixed with '!' then any articles with
matching header lines will be retrieved, irrespective of other kill lines.

* Newnews can be configured to unbatch your news after successful
collection.  If unbatch_news is set to YES and unbatch_command is set to
a valid command to execute which will unbatch news, then upon completion
newnews will test for the existence of batch_txt and run the command if
it exists.

* Additional kill file support through kill_headers allows even
headers to be destroyed.  Normal configuration results in headers of killed
articles being left in batch.txt, so that they might be collected later with
the GET file.

* kill_afterthefact allows all news to be collected, and killing
to be done locally.  This may provide better performance for people just
trying to avoid specific posters, rather than whole newsgroups.

---
Bugs

   None known at present. Report to alex@budgetweb.com, including
   as a minimum, the version of newnews.cmd, a copy of your nntp.dat
   before and after the problem, and a copy of your history before and
   after.

---
Planned Enhancements

   Try to improve performance of kill file implementation by using stem
   variables between NEWNEWS.CMD and RXMATCH.DLL
