home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / bbs / waffle / 4219 < prev    next >
Encoding:
Internet Message Format  |  1992-11-16  |  11.0 KB

  1. Path: sparky!uunet!news.centerline.com!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!wupost!emory!uumind!willard!dawson
  2. From: dawson@willard.UUCP
  3. Newsgroups: comp.bbs.waffle
  4. Subject: Re: News/mail reader
  5. Message-ID: <Dm2BuB2w165w@willard.UUCP>
  6. Date: Mon, 16 Nov 92 07:52:36 EST
  7. References: <u0g0TB5w165w@iowegia.uucp>
  8. Organization: Willard's House BBS, Atlanta, GA -- +1 (404) 664 8814
  9. Lines: 249
  10.  
  11. kjhoule@iowegia.uucp (Kevin Houle) writes:
  12.  
  13. > dell@Apple.COM (Thomas E. Dell) writes:
  14. > > Also something that will *probably* be in 1.66, will be rejection
  15. > > of duplicate articles (making retrieval by Message-ID possible.) 
  16. > This would be nice, Tom. Myself and a handful of local sites exchange
  17. > "dsm" and "ia" newsgroups. We want to achieve some network redundancy,
  18. > which requires being able to weed out duplicate articles.
  19. > For the time being, I've written a program that does just that. Given a
  20. > root directory on the command line, the program recurses through the
  21. > root and sub-directories and deletes duplicate articles based on the
  22. > Message-ID header. As duplicates are removed, the filenames are
  23. > resequenced in ascending order starting with the lowest original
  24. > article. If anyone is interested, let me know.
  25. > --
  26. > Kevin Houle     kjhoule@iowegia.uucp
  27.  
  28. As some of you may remember, I've likewise been ~dealing~ with duplicate
  29. messages, for quite some time.  My original attempt, ANTIDUPE, was made
  30. available to the net a while back.  Several weeks ago I released another
  31. utility, which I called HISTORY.  Well, I've continued my development
  32. efforts on that.  Someone pointed out that 4DOS already has a built-in
  33. 'history' command, so, following the example set by others, I've renamed
  34. it WAFHIST.  The WAFHIST program uses a dBase database to manage messages.
  35. In addition to removing dupes, it will also expire articles.
  36.  
  37. If anyone wishes to receive the latest, greatest, most up-to-date version,
  38. drop me a reply.  It's kinda big:
  39.  
  40. c:\wafhist> wc c:/wafhist/*.uue
  41.      956     973   59053   c:/wafhist/wafhist1.uue
  42.      955     970   59029   c:/wafhist/wafhist2.uue
  43.      955     970   59028   c:/wafhist/wafhist3.uue
  44.      955     970   59028   c:/wafhist/wafhist4.uue
  45.      955     970   59029   c:/wafhist/wafhist5.uue
  46.      955     970   59029   c:/wafhist/wafhist6.uue
  47.      873     895   53922   c:/wafhist/wafhist7.uue
  48.     6604    6718  408118   total
  49.  
  50. Oh, did I not say?  It's very fast.
  51. ---------------------------------------------------------------------------
  52. From WAFHIST.DOC:
  53.  
  54. Program:  WAFHIST
  55.  
  56. Usage: WAFHIST [-soft|-hard] [-init] [-control] [-verbose]
  57.                [-noerase] [-noindex] [-version]
  58.                [-waffle=path] [-history=path] [-spool=path]
  59.                [-type=USENET|-type=LOCAL] [-batch=filespec]
  60.                [-expire=#days] [-debug=filespec]
  61.  
  62.        All the -options are exactly that:  optional.
  63.  
  64.        Defaults are -soft, and -waffle derived from the WAFFLE environment
  65.        variable.  The default function of WAFHIST is to build or update a
  66.        history file for use in performing control actions and expirations;
  67.        also, duplicate messages are removed from subdirectories that contain
  68.        more than one instance of a message.
  69.  
  70.  Compiler:  Clipper 5.01
  71.  Libraries: Funcky 5.0 libraries for Clipper.
  72.  Filename:  WAFHIST.PRG
  73.  
  74.  Author's addresses:
  75.         Willard F. Dawson
  76.         10470 Haynes Bridge Road
  77.         Alpharetta, GA  30202-5033
  78.         Voice: (404) 664-4935 / (404) 303-2343
  79.         willard.uucp: (404) 664-8814 :: Waffle 1.65, 24 hours/day
  80.         gatech.edu!vdbsan!willard!dawson
  81.         emory.edu!slammer!willard!dawson
  82.         X.400: </G=W/S=DAWSON/O=BSAN/ADMD=BELLSOUTH/C=US/@sprint.com>
  83.  
  84. COMMAND LINE OPTIONS
  85.     Most of the command line options may be combined in any sequence, except
  86.     that a couple are toggle switches (-soft/-hard and -type=USENET/LOCAL).
  87.     You can specify conflicting options on the command line, but the last
  88.     option takes precedence.  That is, the command line is scanned from left
  89.     to right.
  90.  
  91.     -soft
  92.         This is the default level of operation.  Soft means that the history
  93.         database is searched for a current occurence of the directory/filename.
  94.         If the file is already referenced with a live (unexpired) entry, then
  95.         no further work is done with this filename.  This mode of operation
  96.         assumes that all live entries in the database are valid, and that no
  97.         one has subsequently replaced the file with another, possibly invalid
  98.         (or un-referenced) message.
  99.     
  100.         As long as all expiration is done from within this program, this is
  101.         probably a valid assumption.  Caveat emptor.
  102.  
  103.     -hard
  104.         A hard search of the database will be made.  This means that a file
  105.         is opened, and it's Message-ID: found.  Once a Message-ID has been
  106.         obtained, that is used to query the database if another file is show
  107.         to have the same Message-ID, then this file will be deleted.
  108.         
  109.         (This form of search is disk intensive.  Really.)
  110.  
  111.     -init
  112.         Forces WAFHIST to delete and rebuild the history database.
  113.  
  114. *   -control
  115.         Adds control messages not already in database, then proceeds to
  116.         execute cancels, newgroups, and rmgroups.  This option is not yet
  117.         supported.  Perhaps in the near future...
  118.  
  119.     -verbose
  120.         Causes WAFHIST to report on significant actions, e.g., file erasure.
  121.  
  122.     -noerase
  123.         Causes WAFHIST to skip file erase operations.  Use this in combina-
  124.         tion with -verbose to have WAFHIST tell you what it would otherwise
  125.         be doing to your news spool.  So, you can test the program without
  126.         committing to the hilt.
  127.  
  128.     -noindex
  129.         Causes WAFHIST to use "LOCATE FOR" syntax rather than "SEEK".. the
  130.         net result of which is that there is no need for the *.NTX index
  131.         files, and they are consequently not built.  The savings in file
  132.         space is significant, though the effect on overall runtime speed
  133.         is sure to be dire.  (* Note:  This is the most recently added
  134.         option, and is therefore the least tested portion of the program.
  135.         Caveat emptor, eh!?)
  136.  
  137.     -version
  138.         Report the current software version and exit.
  139.  
  140.     -waffle=
  141.         Points to Waffle's static file.  The default action is to find the
  142.         static file by reading the DOS environment variable WAFFLE.  This
  143.         option allows you to use an alternative static file.
  144.         Example usage:
  145.             WAFHIST -waffle=c:\waffle\system\static
  146.  
  147.     -history=
  148.         Points to history database directory.  This is the directory which
  149.         is used by WAFHIST for creating the history database (WAFHIST.DBF)
  150.         and index (WAFHIST.NTX, and MESSAGID.NTX) files.  If left unspecified,
  151.         the default directory is C:\WAFHIST.
  152.         Example usage:
  153.             WAFHIST -history=c:\waffle\admin
  154.  
  155.     -spool=
  156.         Points to Usenet spool directory.  If left unspecified, this info
  157.         is derived from the STATIC file (as pointed to by either the WAFFLE
  158.         environment variable or the -waffle= option).
  159.         Example usage:
  160.             WAFHIST -spool=c:\news
  161.  
  162.     -batch=
  163.         Points to a batch specification file.  See the accompanying MS-DOS
  164.         batch program file PREBATCH.BAT for an example of usage of this
  165.         option.
  166.  
  167.         [ Here is a description of the algorithm that is used here:
  168.  
  169.           for each line in batch_spec_file do
  170.               search for corresponding entry in history database
  171.               if an entry is not found
  172.                   search for existing entry with the same Message-ID header
  173.                   if an entry is not found
  174.                       add an entry for this message into the history db.
  175.                   else (an entry with the same Message-ID already exists)
  176.                       delete the current line from the batch_spec_file
  177.                       delete the corresponding file from the news spool
  178.                   endif
  179.               endif
  180.           endfor
  181.         ]
  182.  
  183.         Example usage:
  184.             WAFHIST -batch=c:\spool\comp16\test
  185.  
  186.     -expire=
  187.         Messages older than n days are expired (deleted) from the news spool.
  188.         Example usage:
  189.             WAFHIST -expire=14
  190.  
  191. *   -purge=
  192.         Forces WAFHIST to delete info for messages that were cancelled n days
  193.         ago.  The reason this info is not deleted as the messages themselves
  194.         are cancelled is so that those messages do not (incorrectly) get re-
  195.         entered into the database if they get re-fed (for whatever reason).
  196.         This function is not yet implemented; neither is there support yet
  197.         for the cancel control message.
  198.         Example usage:
  199.             WAFHIST -purge=14
  200.  
  201.     -type=
  202.         Specifies one of LOCAL or USENET.  The default is BOTH if unspecified.
  203.         Only one of either LOCAL or USENET may be specified.
  204.         Example usage:
  205.             WAFHIST -type=USENET
  206.  
  207.     -debug=
  208.         Secondary output (to file) for screen output, just for debugging.
  209.         (The screen output of Clipper files is in general NOT redirectaable
  210.          to files using > or >>.  [ I KNOW, yech! ].)
  211.         Example usage:
  212.             WAFHIST -debug=c:\wafhist\wafhist.dbg
  213. ---------------------------------------------------------------------------
  214. From UPDATE.DOC:
  215. Mon Oct  5 07:10:15 EDT 1992 Version 0.10
  216.  
  217. Fixed bug with piece of code used to detect whether the history.exe file
  218. was newer than the history.dbf file.
  219. ----------------------------------------
  220. Sun Oct 25 21:34:27 EDT 1992 Version 0.11
  221.  
  222. Fixed bug that incorrectly left news article file open after detecting that
  223. no Message-Id header exists.
  224.  
  225. Added new features, including a status.dbf database file, altered expiration
  226. function to be based on number of days since the article arrived, and enhanced
  227. the operation of the new file scan.  No file is scanned unless it arrived after
  228. the last scan, or unless it is older than the expiration date (if the expire
  229. option is specified).
  230. ----------------------------------------
  231. Sun Nov 15 13:08:12 EDT 1992 Version 0.12
  232.  
  233. Changed operation of -batch option, so that recent change (to only scan a
  234. file if its creation date/time is prior to the last scan date/time) is not
  235. in effect.  That is, if the -batch option is specified, all the files in
  236. the given specification file will be examined.
  237.  
  238. Changed the name of this utility program from HISTORY to WAFHIST, for a
  239. couple of reasons.  For one, 4DOS has an internal history command, resulting
  240. in a name-space collision.  For another, WAFHIST more clearly shows that
  241. this utility is meant to be used with Waffle, in the same sense as Wafmail
  242. and other utilities.
  243. ----------------------------------------
  244. Sun Nov 15 16:37:28 EDT 1992 Version 0.13
  245.  
  246. Added support for "LOCATE" searches of the database via the -noindex option,
  247. enabling those with little disk space to use the program, as the *.NTX index
  248. files are then unnecessary.  This is offered as a configurable option, so
  249. that those with space to spare can continue to use the index files, as the
  250. "LOCATE" form of dBase file search is time-intensive, and generally to be
  251. avoided when at all possible.
  252.  
  253. -- 
  254. dawson@willard.UUCP (Willard Dawson)
  255. Willard's House BBS, Atlanta, GA -- +1 (404) 664 8814
  256.