home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / pmnews.zip / SNEWS.DOC < prev    next >
Text File  |  1991-11-08  |  19KB  |  456 lines

  1.  
  2.                             Simple NEWS 1.0
  3.                             ===============
  4.  
  5.  
  6. INTRODUCTION
  7. ============
  8.  
  9.     'Simple NEWS' is an news add-on for UUPC.  It is intended for use as a
  10.     leaf node and offers:
  11.  
  12.       - Threaded news reading.  This allows you to be much more
  13.         selective about what you read, enabling you to cover many more
  14.         newsgroups.
  15.  
  16.       - The when a cross-posted article is read the news-reader marks all
  17.         the other instances of the article as read too.
  18.  
  19.       - Separate rc files are kept for each user, which record the individual
  20.         articles that you have seen.  This is in contrast to some readers
  21.         which simply record the highest article number read.  The user is
  22.         defined, as for mail users, in the file pointed to by the UUPCUSRRC
  23.         environment variable.
  24.  
  25.       - Usual range of response facilities: follow-up news, reply by mail,
  26.         forward by mail, save article/thread to disk.
  27.  
  28.       - Articles are now stored in one file per newsgroup, rather than
  29.         one file per article.  This results in an enormous saving (up to 3:1)
  30.         in disk space on disks with with a default cluster size of 4kb per
  31.         cluster.
  32.  
  33.       - Processing of batched/compressed news.  Unbatched and uncompressed
  34.         are not processed.  Control messages are not processed.
  35.  
  36.       - Posting - Posts are unbatched and uncompressed.  You can only post
  37.         to your 'mailserv'.  You cannot feed another site.  Posting can only
  38.         be done from within the news reader SNEWS.  If you are looking for
  39.         something to feed other sites why not try Waffle?
  40.  
  41.       - 'Received date' oriented expire to maintain the news database.
  42.  
  43.     I looked at porting Tass and wnews, but in the end decided they were
  44.     far more effort than it was worth, as these news systems were more
  45.     complicated than was necessary for a single user (at a time) dos
  46.     implementation.  Especially when the PC is likely to be a leaf node.
  47.  
  48.     Generally the algorithms used are simple, but the speed is adequate
  49.     for a feed for several users, expiring after 5-10 days.  The main
  50.     bottleneck occurs during the 'expire' operation, which must rewrite
  51.     the entire news database.
  52.  
  53.     'Simple NEWS' was built rather quickly (and it shows in places :-) to
  54.     suit my own needs.  I'm distributing it in the hope you might find it
  55.     useful.
  56.  
  57.     [Posting is a bit of a kludge.  The D... and X... files are created,
  58.     then queued using the UUCP program.  If you look in the source code
  59.     you will see this is all a bit dodgy.  I should sort this out some
  60.     time.  I've tested it by posting to a Waffle system which isn't all
  61.     that fussy, and by posting to a CNEWS/Unix SYSV system, which is
  62.     rather particular].
  63.  
  64.  
  65.   Requirements
  66.   ------------
  67.  
  68.     - A minimum of PC-XT, 640k RAM, plenty free.  The uncompress
  69.       is the hungry bit.  If you use a lot of TSR's, you could get
  70.       around this by having your feed use 12 bit compression.
  71.  
  72.     - Several megabytes of disk depending on size of the feed.
  73.       In NZ the 100 groups in my active file runs at about 45MB/month. So
  74.       you need to turn it over reasonably quickly.
  75.  
  76.     - You must have installed UUPC and the optional program, UUCP in
  77.       particular.  I'm using 11k.  You do not need any UUPC sources to
  78.       build Simple NEWS.
  79.  
  80.     The sources compile under Borland's TC++ and BC++, but I imagine you
  81.     should be able to compile it under earlier versions of TC and port it
  82.     to other MS-DOS ANSI C compilers with out much trouble.
  83.  
  84.  
  85.   Support
  86.   -------
  87.  
  88.     I don't want to be *deluged* with complaints, bug reports, or suggestions
  89.     for improvements.  I can think of enough of these for myself, :-).  And
  90.     no whining about the dodgy processing of the headers.  This will be
  91.     fixed sometime.
  92.  
  93.     If you have a problem, please try hard to solve it before you contact
  94.     me.  If you find a bug let me know.  Unless a bug absolutely cripples
  95.     you, you'll have to wait for the next release.  This policy arises
  96.     largely out of the fact that email costs me $$$.
  97.  
  98.  
  99.  
  100.   Caveats & Copyright
  101.   -------------------
  102.  
  103.     This software is copyright (1991) by John McCombs, Christchurch,
  104.     New Zealand.
  105.  
  106.     This package is free software, but NOT public domain; you can
  107.     redistribute it and/or modify it under the terms of the GNU
  108.     General Public License, version 1, as published by the Free Software
  109.     Foundation.
  110.  
  111.     This program is distributed in the hope that it will be useful,
  112.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  113.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  114.     GNU General Public License for more details.
  115.  
  116.     See the file COPYING, which contains a copy of the GNU General
  117.     Public License.
  118.  
  119.     The compress included here was not written by me, and is to the best
  120.     of my knowledge in the public domain.  Any unix compatible compress may
  121.     be used.
  122.  
  123.  
  124.   Acknowledgments
  125.   ---------------
  126.  
  127.     I'd like to thank Steve Kohlenberger, of PreSoft Architects, for
  128.     making suggestions and doing some testing for me.
  129.  
  130.  
  131. FILES AND DIRECTORIES
  132. =====================
  133.  
  134.     NEWS BASE DIRECTORY - This is the top level directory for Simple NEWS.
  135.       the active file and the users rc files are kept here.  This directory
  136.       is defined by the environment variable UUPCNEWS
  137.  
  138.     *.NRC - These files have a list of the articles which a user has
  139.       seen.  The name of the file is derived from the 'mailbox' variable,
  140.       for example my news rc file would be 'john.nrc'.  The nrc files are
  141.       kept in the news base directory.
  142.  
  143.       The nrc files are created and maintained automatically by the news
  144.       reader and should not be edited by hand.  If one becomes corrupted,
  145.       just delete it.
  146.  
  147.     HISTORY - The history file contains a list of the message-id's of all
  148.       the cross-posted articles in the database.  It is used by the
  149.       news-reader to find all the instances of a cross-posted article,
  150.       The file fields are message-id, received date in seconds (Unix date),
  151.       newsgroup name & article number for each instance of the article.
  152.       The history entries are added by 'unbatch' and deleted by 'expire'.
  153.  
  154.     ACTIVE - The active file contains a list of the newsgroups we expect to
  155.       get.  The format is defined under installation, below.  All articles
  156.       to newsgroups not defined in the active file are posted to junk.
  157.       You MUST use 'addgroup' and 'rmgroup' to maintain the active file.
  158.       DON'T use and editor on it.
  159.  
  160.       The active file is in the news base directory.
  161.  
  162.     NG - This file is a list of newsgroup names, one per line, that you
  163.       can post to.  You can post only to groups listed in this file.  The
  164.       newsgroups file is in the news base directory.  If you want to
  165.       prevent anyone posting, simply remove the ng file.
  166.  
  167.     POST.LOG - This file, which is in the news base directory, is a log
  168.       of all postings.  You can read this file with 'mail' using the
  169.       -f option.
  170.  
  171.     ARTICLES - these are placed in files in a directory called 'newsbase'
  172.       which is a sub-directory of the news base directory.  There is one text
  173.       file and one index file for each newsgroup.  The name of the text file
  174.       is found in the second field of the corresponding entry in the active
  175.       file.  For example if the news base directory is d:\uucp\news
  176.       then articles in comp.sys.ibm.pc might be in a file called:
  177.  
  178.         d:\uucp\news\newsbase\87297243
  179.  
  180.       and the index file will be
  181.  
  182.         d:\uucp\news\newsbase\87297243.IDX
  183.  
  184.       Don't change these files by hand - use expire to do the deletion,
  185.       to keep the active file in sync.  Use 'addgroup' to create them
  186.       and 'rmgroup' to remove them.
  187.  
  188.     INDEX FILES - Each newsgroup has an index file which has information
  189.       about the articles in that newsgroup.  The format is
  190.  
  191.           00000000 00000001 687297893  Re: senior (humph!)
  192.           00001927 00000002 687297893  need rx02 controller.
  193.           00002801 00000003 687297893  Re: senior (humph!)
  194.           00003707 00000004 687297893  Another dumb luser story
  195.  
  196.       The first field is the offset of the article in the text file. The
  197.       second field is the article number.  The third field is the date/time
  198.       that the article was added to the database, and the fourth field
  199.       is the article subject.  This latter field is used by the newsreader
  200.       to build the threads.
  201.  
  202.     INCOMING NEWS BATCHES - These are placed by UUPC in the directory
  203.       defined by the 'NewsDir' UUPC.RC variable.  Unbatch processes the
  204.       batches from this directory, and deletes them when done.
  205.  
  206.     EXE Files - These can be placed in any directory that is included
  207.       in the PATH statement.  They are unbatch.exe, snews.exe, expire.exe
  208.       addgroup.exe rmgroup.exe and compress.exe.
  209.  
  210.  
  211. INSTALLATION
  212. ============
  213.  
  214. Installation is easy.
  215.  
  216.     0.  First get UUPC going and delivering news batches into the
  217.         'incoming' directory.  The name of this directory is set in the
  218.         UUPC.RC file using the 'NewsDir' variable.  The incoming directory
  219.         *must* be reserved solely for this purpose, and it must have
  220.         no files in it, other than the news batches that 'uuxqt' will
  221.         create there.
  222.  
  223.     1.  Put "set UUPCNEWS=c:\uucp\news" in your autoexec.bat.  This is
  224.         the 'root' directory for your news system.  The 'active', 'ng' etc
  225.         files are placed here and the news database is a subdirectory
  226.         of this directory.  UUPCNEWS must be *different* from the 'NewsDir'
  227.         specified in the UUPC.RC file.
  228.  
  229.         The 'NewsDir' directory is where batches of news are deposited by
  230.         'uuxqt'.  It is also the place where 'unbatch' looks for work.
  231.         If your news base directory is "c:\uucp\news" then you might
  232.         use "c:\uucp\news\incoming" as the 'NewsDir', eg:
  233.  
  234.              set UUPCNEWS=c:\uucp\news          <-- in autoexec.bat
  235.  
  236.              NewsDir=c:\uucp\news\incoming      <-- in UUPC.RC
  237.  
  238.  
  239.     2.  Create the 'active' file in this directory, using 'addgroup'.
  240.         For example:
  241.  
  242.             addgroup alt.sources comp.sys.ibm.pc.misc comp.sys.ibm.pc
  243.  
  244.         Each entry has the form of "alt.sources 87297268 00000000 00000000 y".
  245.         The first number is the filename of the file where the articles are
  246.         stored.  The next two numbers are the the lowest article number
  247.         (minus 1) and the highest article number, respectively.
  248.         The three numbers MUST be EXACTLY 8 digits long with EXACTLY one space
  249.         between them.  The last field is ignored.
  250.  
  251.         An example 'active.bat' file is included.
  252.  
  253.         ADDGROUP should be run from a batch file, so that you can easily
  254.         re-initialise the news system should the need ever arise.
  255.  
  256.     3.  Create a the 'ng' newsgroups file in the same directory as the active
  257.         file.  This file should contain the names of the newsgroups that
  258.         you wish to be able to post in.  As a minimum you probably want
  259.         the groups in your active files, less the names of the moderated
  260.         groups.  The file 'ng' looks like this:
  261.  
  262.             alt.angst
  263.             alt.aquaria
  264.             alt.artcom
  265.             alt.astrology
  266.             alt.atheism
  267.  
  268.         An example 'ng' file is included.
  269.  
  270.     4.  Edit the makefile and run it, and/or put the exe files in the DOS PATH.
  271.  
  272.     6.  Call your host and get some news.  Copy some of these batches into
  273.         another directory, so that you can use them again for testing
  274.         purposes.
  275.  
  276.         Run 'unbatch'.  This is where most problems occur.  Check:
  277.  
  278.            - That your disk is not full.
  279.  
  280.            - That the 'TempDir' directory specified in the UUPC.RC
  281.              file exists.  Check that there is also room on this drive.
  282.  
  283.            - Before the unbatch there should be some files with names
  284.              like '290f8f99.001'.  These are the news batches.
  285.  
  286.            - Dump the first part of one of these batches.  The file
  287.              should start with '#! cunbatch'.  If it doesn't, check that
  288.              your host is sending compressed batched news to you.
  289.  
  290.            - Run 'unbatch -n'.  The -n switch tells unbatch to feed the
  291.              first batch to compress and then stop.  If you look in TempDir
  292.              you should see two files, '$unbatch' and '$unbatch.z'.  The
  293.              first file is the uncompressed version of the latter.
  294.  
  295.              If the uncompress fails, check that you are using the
  296.              compress.exe supplied with Simple NEWS.  If you have another
  297.              compress.exe make sure the the SNEWS one is first on the DOS
  298.              PATH.
  299.  
  300.              Compress is run with the command line 'compress -d $unbatch.z',
  301.              and it must *not* convert unix type linefeeds to DOS style
  302.              cr/lf.
  303.  
  304.              Look in '$unbatch' with an editor.  You should see news
  305.              articles separated by the string '#rnews <number>'.
  306.  
  307.     5.  Modify UUIO.BAT putting "unbatch" after the last line of the
  308.         file.
  309.  
  310.     Once you have done this you should have your batches processed
  311.     automatically after transfer.  Use SNEWS to read your news, and
  312.     run expire once in a while to deleted the old stuff.  You could
  313.     stick the expire in your autoexec file.
  314.  
  315.  
  316.     Help!
  317.     -----
  318.  
  319.     In general you should not edit/delete the active file or the news
  320.     database files by hand.  Use only addgroup/rmgroup/unbatch/expire
  321.     for these tasks.
  322.  
  323.     The history and *.nrc files should not be edited by hand, but
  324.     deleting them is not fatal.  If they get corrupted, just delete
  325.     them.
  326.  
  327.     The active file, article text files and index files are all checked
  328.     to ensure that they stay in sync.  If someting gets corrupted you
  329.     can probably fix the problem by using rmgroup to delete the affected
  330.     group, then using addgroup to put it back.  The most likely cause of
  331.     this problem is 'unbatch' or 'expire' crashing.
  332.  
  333.     If things get really messed up your only option may be to re-init the
  334.     news system.
  335.  
  336.     You cannot post articles without a valid 'ng' file.  You can only
  337.     post to newsgroups listed in the 'ng' file.
  338.  
  339.  
  340. SNEWS - NEWS READER
  341. ===================
  342.  
  343.     SNEWS is a threaded news reader, somewhat reminiscent of TASS.  The
  344.     display has three levels, choose a newsgroup, choose a thread, and
  345.     read an article.  At each level the Home/End/PgUp/PgDn/UpArr/DnArr
  346.     can be used to move around.  ENTER selects whatever you are
  347.     pointing at, and TAB moves you to the next unread group/article.
  348.     To read the all of a thread (read and unread) keep hitting ENTER.
  349.     ESCAPE takes you back a level.
  350.  
  351.     'h' invokes a help screen,  'c' marks all articles in a group as read.
  352.     'p' posts an article, from any level.
  353.  
  354.     When reading an article 'r' and 'f' allow a mail reply and a news
  355.     followup of the current article, respectively.  You are given the
  356.     option of quoting the article.  'x' toggles a rot13 conversion of the
  357.     article.  PgUp from the start of the article will display all the
  358.     headers.
  359.  
  360.     The above commands are case sensitive.
  361.  
  362.     SNEWS maintains a list in the user's .nrc file of which articles have
  363.     been seen.
  364.  
  365.     In the group and thread levels the number of unread articles, if any,
  366.     is displayed, followed by the total number of articles, in brackets,
  367.     for each group/thread.
  368.  
  369.     The threads are constructed in the order that the articles were unbatched
  370.     which is usually pretty close to the chronological order.
  371.  
  372.     When you read a cross-posted article, all the other instances of that
  373.     article, in the other newsgroups, are also marked as read.  This saves
  374.     you having to sort out which articles you have previously seen.  If
  375.     you use 'c' to mark all the articles in a group as read, the instances
  376.     of cross-posted articles in other groups are *not* marked.
  377.  
  378.     Free memory is shown in [] at the top of each page.  You'll probably
  379.     have a hard time using it all up.
  380.  
  381.  
  382.     Posting
  383.     -------
  384.  
  385.     You can only post to newsgroups listed in the 'ng' file in the news base
  386.     directory.  If a newsgroup name is in the 'active' file, but not in the
  387.     'ng' you will not be able to post to that group.  This is a suitable way
  388.     to prevent posts to a moderated group.
  389.  
  390.     A copy of each post is saved in a file called 'post.log' in the news base
  391.     directory.  This file may be perused using mail, with a command like
  392.  
  393.         mail -f \uucp\news\post.log
  394.  
  395.  
  396. UNBATCH
  397. =======
  398.  
  399.     Just run it.  It looks for work in the UUPC.RC NewsDir directory,
  400.     and tosses the articles into the files defined in the active file.
  401.     News batches are removed as they are successfully processed.
  402.  
  403.     The only option is "-n".  This option causes the program to halt after
  404.     uncompressing the first batch, without unbatching it.  The uncompressed
  405.     file remains in the temp directory.  This switch is helpful in tracing
  406.     unpacking problems.
  407.  
  408.     Requires COMPRESS.EXE to be on the PATH.  Unbatch requires around
  409.     500k of free memory for the uncompress of 16 bit news batches.
  410.  
  411.  
  412. EXPIRE
  413. ======
  414.  
  415.     Expire takes one argument, the number of days.
  416.  
  417.         expire 5
  418.  
  419.     will delete articles 5 days or older from the news database.
  420.  
  421.     Expire will give you summary of the number of articles and size
  422.     of the remaining news database, and of the articles deleted.
  423.  
  424.  
  425.  
  426. ADDGROUP
  427. ========
  428.  
  429.     The 'addgroup' utility is used to create or add groups to the active
  430.     file.  For example:
  431.  
  432.         addgroup alt.sources  comp.sys.ibm.pc.misc  comp.sys.ibm.pc
  433.  
  434.     will add these groups, creating an new active file if none exists.
  435.     The newsgroup files in the 'newsbase' directory are also created.
  436.  
  437.  
  438. RMGROUP
  439. =======
  440.  
  441.     To remove a newsgroup, simply run rmgroup, followed by the newsgroup
  442.     names.  For example
  443.  
  444.         rmgroup alt.sources comp.sys.ibm.pc.misc comp.sys.ibm.pc
  445.  
  446.     This will remove the files and delete the entry from the active file.
  447.     The 'ng' newsgroups file is unaffected.
  448.  
  449.  
  450.  
  451. --
  452. Good luck
  453.  
  454. John McCombs
  455. john@ahuriri.gen.nz
  456.