NOTE: This documentation is somewhat out of date. Read README.OS2 for changes in the OS/2 (SNEWS /2) releases. ----------- Simple NEWS 1.0 =============== INTRODUCTION ============ 'Simple NEWS' is an news add-on for UUPC. It is intended for use as a leaf node and offers: - Threaded news reading. This allows you to be much more selective about what you read, enabling you to cover many more newsgroups. - The when a cross-posted article is read the news-reader marks all the other instances of the article as read too. - Separate rc files are kept for each user, which record the individual articles that you have seen. This is in contrast to some readers which simply record the highest article number read. The user is defined, as for mail users, in the file pointed to by the UUPCUSRRC environment variable. - Usual range of response facilities: follow-up news, reply by mail, forward by mail, save article/thread to disk. - Articles are now stored in one file per newsgroup, rather than one file per article. This results in an enormous saving (up to 3:1) in disk space on disks with with a default cluster size of 4kb per cluster. - Processing of batched/compressed news. Unbatched and uncompressed are not processed. Control messages are not processed. - Posting - Posts are unbatched and uncompressed. You can only post to your 'mailserv'. You cannot feed another site. Posting can only be done from within the news reader SNEWS. If you are looking for something to feed other sites why not try Waffle? - 'Received date' oriented expire to maintain the news database. I looked at porting Tass and wnews, but in the end decided they were far more effort than it was worth, as these news systems were more complicated than was necessary for a single user (at a time) dos implementation. Especially when the PC is likely to be a leaf node. Generally the algorithms used are simple, but the speed is adequate for a feed for several users, expiring after 5-10 days. The main bottleneck occurs during the 'expire' operation, which must rewrite the entire news database. 'Simple NEWS' was built rather quickly (and it shows in places :-) to suit my own needs. I'm distributing it in the hope you might find it useful. [Posting is a bit of a kludge. The D... and X... files are created, then queued using the UUCP program. If you look in the source code you will see this is all a bit dodgy. I should sort this out some time. I've tested it by posting to a Waffle system which isn't all that fussy, and by posting to a CNEWS/Unix SYSV system, which is rather particular]. Requirements ------------ - A minimum of PC-XT, 640k RAM, plenty free. The uncompress is the hungry bit. If you use a lot of TSR's, you could get around this by having your feed use 12 bit compression. - Several megabytes of disk depending on size of the feed. In NZ the 100 groups in my active file runs at about 45MB/month. So you need to turn it over reasonably quickly. - You must have installed UUPC and the optional program, UUCP in particular. I'm using 11k. You do not need any UUPC sources to build Simple NEWS. The sources compile under Borland's TC++ and BC++, but I imagine you should be able to compile it under earlier versions of TC and port it to other MS-DOS ANSI C compilers with out much trouble. Support ------- I don't want to be *deluged* with complaints, bug reports, or suggestions for improvements. I can think of enough of these for myself, :-). And no whining about the dodgy processing of the headers. This will be fixed sometime. If you have a problem, please try hard to solve it before you contact me. If you find a bug let me know. Unless a bug absolutely cripples you, you'll have to wait for the next release. This policy arises largely out of the fact that email costs me $$$. Caveats & Copyright ------------------- This software is copyright (1991) by John McCombs, Christchurch, New Zealand. This package is free software, but NOT public domain; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 1, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. See the file COPYING, which contains a copy of the GNU General Public License. The compress included here was not written by me, and is to the best of my knowledge in the public domain. Any unix compatible compress may be used. Acknowledgments --------------- I'd like to thank Steve Kohlenberger, of PreSoft Architects, for making suggestions and doing some testing for me. FILES AND DIRECTORIES ===================== NEWS BASE DIRECTORY - This is the top level directory for Simple NEWS. the active file and the users rc files are kept here. This directory is defined by the environment variable UUPCNEWS *.NRC - These files have a list of the articles which a user has seen. The name of the file is derived from the 'mailbox' variable, for example my news rc file would be 'john.nrc'. The nrc files are kept in the news base directory. The nrc files are created and maintained automatically by the news reader and should not be edited by hand. If one becomes corrupted, just delete it. HISTORY - The history file contains a list of the message-id's of all the cross-posted articles in the database. It is used by the news-reader to find all the instances of a cross-posted article, The file fields are message-id, received date in seconds (Unix date), newsgroup name & article number for each instance of the article. The history entries are added by 'unbatch' and deleted by 'expire'. ACTIVE - The active file contains a list of the newsgroups we expect to get. The format is defined under installation, below. All articles to newsgroups not defined in the active file are posted to junk. You MUST use 'addgroup' and 'rmgroup' to maintain the active file. DON'T use and editor on it. The active file is in the news base directory. NG - This file is a list of newsgroup names, one per line, that you can post to. You can post only to groups listed in this file. The newsgroups file is in the news base directory. If you want to prevent anyone posting, simply remove the ng file. POST.LOG - This file, which is in the news base directory, is a log of all postings. You can read this file with 'mail' using the -f option. ARTICLES - these are placed in files in a directory called 'newsbase' which is a sub-directory of the news base directory. There is one text file and one index file for each newsgroup. The name of the text file is found in the second field of the corresponding entry in the active file. For example if the news base directory is d:\uucp\news then articles in comp.sys.ibm.pc might be in a file called: d:\uucp\news\newsbase\87297243 and the index file will be d:\uucp\news\newsbase\87297243.IDX Don't change these files by hand - use expire to do the deletion, to keep the active file in sync. Use 'addgroup' to create them and 'rmgroup' to remove them. INDEX FILES - Each newsgroup has an index file which has information about the articles in that newsgroup. The format is 00000000 00000001 687297893 Re: senior (humph!) 00001927 00000002 687297893 need rx02 controller. 00002801 00000003 687297893 Re: senior (humph!) 00003707 00000004 687297893 Another dumb luser story The first field is the offset of the article in the text file. The second field is the article number. The third field is the date/time that the article was added to the database, and the fourth field is the article subject. This latter field is used by the newsreader to build the threads. INCOMING NEWS BATCHES - These are placed by UUPC in the directory defined by the 'NewsDir' UUPC.RC variable. Unbatch processes the batches from this directory, and deletes them when done. EXE Files - These can be placed in any directory that is included in the PATH statement. They are unbatch.exe, snews.exe, expire.exe addgroup.exe rmgroup.exe and compress.exe. INSTALLATION ============ Installation is easy. 0. First get UUPC going and delivering news batches into the 'incoming' directory. The name of this directory is set in the UUPC.RC file using the 'NewsDir' variable. The incoming directory *must* be reserved solely for this purpose, and it must have no files in it, other than the news batches that 'uuxqt' will create there. 1. Put "set UUPCNEWS=c:\uucp\news" in your autoexec.bat. This is the 'root' directory for your news system. The 'active', 'ng' etc files are placed here and the news database is a subdirectory of this directory. UUPCNEWS must be *different* from the 'NewsDir' specified in the UUPC.RC file. The 'NewsDir' directory is where batches of news are deposited by 'uuxqt'. It is also the place where 'unbatch' looks for work. If your news base directory is "c:\uucp\news" then you might use "c:\uucp\news\incoming" as the 'NewsDir', eg: set UUPCNEWS=c:\uucp\news <-- in autoexec.bat NewsDir=c:\uucp\news\incoming <-- in UUPC.RC 2. Create the 'active' file in this directory, using 'addgroup'. For example: addgroup alt.sources comp.sys.ibm.pc.misc comp.sys.ibm.pc Each entry has the form of "alt.sources 87297268 00000000 00000000 y". The first number is the filename of the file where the articles are stored. The next two numbers are the the lowest article number (minus 1) and the highest article number, respectively. The three numbers MUST be EXACTLY 8 digits long with EXACTLY one space between them. The last field is ignored. An example 'active.bat' file is included. ADDGROUP should be run from a batch file, so that you can easily re-initialise the news system should the need ever arise. 3. Create a the 'ng' newsgroups file in the same directory as the active file. This file should contain the names of the newsgroups that you wish to be able to post in. As a minimum you probably want the groups in your active files, less the names of the moderated groups. The file 'ng' looks like this: alt.angst alt.aquaria alt.artcom alt.astrology alt.atheism An example 'ng' file is included. 4. Edit the makefile and run it, and/or put the exe files in the DOS PATH. 6. Call your host and get some news. Copy some of these batches into another directory, so that you can use them again for testing purposes. Run 'unbatch'. This is where most problems occur. Check: - That your disk is not full. - That the 'TempDir' directory specified in the UUPC.RC file exists. Check that there is also room on this drive. - Before the unbatch there should be some files with names like '290f8f99.001'. These are the news batches. - Dump the first part of one of these batches. The file should start with '#! cunbatch'. If it doesn't, check that your host is sending compressed batched news to you. - Run 'unbatch -n'. The -n switch tells unbatch to feed the first batch to compress and then stop. If you look in TempDir you should see two files, '$unbatch' and '$unbatch.z'. The first file is the uncompressed version of the latter. If the uncompress fails, check that you are using the compress.exe supplied with Simple NEWS. If you have another compress.exe make sure the the SNEWS one is first on the DOS PATH. Compress is run with the command line 'compress -d $unbatch.z', and it must *not* convert unix type linefeeds to DOS style cr/lf. Look in '$unbatch' with an editor. You should see news articles separated by the string '#rnews '. 5. Modify UUIO.BAT putting "unbatch" after the last line of the file. Once you have done this you should have your batches processed automatically after transfer. Use SNEWS to read your news, and run expire once in a while to deleted the old stuff. You could stick the expire in your autoexec file. Help! ----- In general you should not edit/delete the active file or the news database files by hand. Use only addgroup/rmgroup/unbatch/expire for these tasks. The history and *.nrc files should not be edited by hand, but deleting them is not fatal. If they get corrupted, just delete them. The active file, article text files and index files are all checked to ensure that they stay in sync. If someting gets corrupted you can probably fix the problem by using rmgroup to delete the affected group, then using addgroup to put it back. The most likely cause of this problem is 'unbatch' or 'expire' crashing. If things get really messed up your only option may be to re-init the news system. You cannot post articles without a valid 'ng' file. You can only post to newsgroups listed in the 'ng' file. SNEWS - NEWS READER =================== SNEWS is a threaded news reader, somewhat reminiscent of TASS. The display has three levels, choose a newsgroup, choose a thread, and read an article. At each level the Home/End/PgUp/PgDn/UpArr/DnArr can be used to move around. ENTER selects whatever you are pointing at, and TAB moves you to the next unread group/article. To read the all of a thread (read and unread) keep hitting ENTER. ESCAPE takes you back a level. 'h' invokes a help screen, 'c' marks all articles in a group as read. 'p' posts an article, from any level. When reading an article 'r' and 'f' allow a mail reply and a news followup of the current article, respectively. You are given the option of quoting the article. 'x' toggles a rot13 conversion of the article. PgUp from the start of the article will display all the headers. The above commands are case sensitive. SNEWS maintains a list in the user's .nrc file of which articles have been seen. In the group and thread levels the number of unread articles, if any, is displayed, followed by the total number of articles, in brackets, for each group/thread. The threads are constructed in the order that the articles were unbatched which is usually pretty close to the chronological order. When you read a cross-posted article, all the other instances of that article, in the other newsgroups, are also marked as read. This saves you having to sort out which articles you have previously seen. If you use 'c' to mark all the articles in a group as read, the instances of cross-posted articles in other groups are *not* marked. Free memory is shown in [] at the top of each page. You'll probably have a hard time using it all up. Posting ------- You can only post to newsgroups listed in the 'ng' file in the news base directory. If a newsgroup name is in the 'active' file, but not in the 'ng' you will not be able to post to that group. This is a suitable way to prevent posts to a moderated group. A copy of each post is saved in a file called 'post.log' in the news base directory. This file may be perused using mail, with a command like mail -f \uucp\news\post.log UNBATCH ======= Just run it. It looks for work in the UUPC.RC NewsDir directory, and tosses the articles into the files defined in the active file. News batches are removed as they are successfully processed. The only option is "-n". This option causes the program to halt after uncompressing the first batch, without unbatching it. The uncompressed file remains in the temp directory. This switch is helpful in tracing unpacking problems. Requires COMPRESS.EXE to be on the PATH. Unbatch requires around 500k of free memory for the uncompress of 16 bit news batches. EXPIRE ====== Expire takes one argument, the number of days. expire 5 will delete articles 5 days or older from the news database. Expire will give you summary of the number of articles and size of the remaining news database, and of the articles deleted. ADDGROUP ======== The 'addgroup' utility is used to create or add groups to the active file. For example: addgroup alt.sources comp.sys.ibm.pc.misc comp.sys.ibm.pc will add these groups, creating an new active file if none exists. The newsgroup files in the 'newsbase' directory are also created. RMGROUP ======= To remove a newsgroup, simply run rmgroup, followed by the newsgroup names. For example rmgroup alt.sources comp.sys.ibm.pc.misc comp.sys.ibm.pc This will remove the files and delete the entry from the active file. The 'ng' newsgroups file is unaffected. -- Good luck John McCombs john@ahuriri.gen.nz