home *** CD-ROM | disk | FTP | other *** search
- NUEXPIRE.PL Version 2.0 11/15/92
- A Waffle maintainence utility for MS-DOS Waffle BBS systems.
- by Roy M. Silvernail (roy%cybrspc@cs.umn.edu)
- This program is in the public domain.
- =========================================================================
- New for V2.0
- Added '-autonuke' to unconditionally nuke the whole spool. This can
- be useful if you have to make an unexpected trip out of town.
- The 'ignore group' option now works more intuitively. A trailing
- period will confine protection to only that group. (same syntax as
- the /waffle/system/feeds file)
- NUEXPIRE does a chdir() to each directory, to speed up the stat()
- process. Articles are considered for expiry if they are regular
- files. (formerly, no article was considered unless it an
- all-numeric name) This will break some 1.64 usage, if your articles
- are above 32,767. Sorry... upgrade to 1.65 or trim your newsgroups
- on occasion.
-
- New for V1.8
- Added "-s" to just display statistics of how long each group is kept.
- The static file parsing now allows lines of the form 'flag:option' (with
- no whitespace).
- The 'local' forum file is not processed.
- (changes courtesy of Bill Fenner, to whom I tip my hat!)
-
- New for V1.7
- Default /expire flags are now respected. Many little tweaks.
- NUEXPIRE should be run with perl 4.0, for best results.
- There is a little documentation on the debug flags. Try
- 'nuexpire -d99' to see it, or just look at the bottom of the
- NUEXPIRE file.
- The logfile works properly now, instead of logging every article
- considered.
-
- New for V1.6
- Now supports expiry of groups in all forum description files.
-
- New for V1.5
- Added the -nuke option, to clean all possible material from the news
- spool, while still maintaining the Waffle numbering. High messages
- in each group are truncated to 0 bytes.
-
- New for V1.4
- Fixed a small bug that left 0-byte files laying around. This was a
- byproduct of the logfile option.
-
- New for V1.3:
- A group or set of groups can be spared for a given run, using the -x
- switch.
-
- New for V1.2:
- A log of deleted articles can be kept.
- The documentation has been improved a bit.
-
- New for V1.1
- A small bug with graded expire is fixed.
-
- NUEXPIRE.PL is an expire utility designed for maintainence of MS-DOS
- Waffle BBS systems. NUEXPIRE will expire news articles based on age,
- expire those articles that have been read by a certain user, or remove
- all the news on your news spool. NUEXPIRE also supports a grading
- system and a command-line exclusion switch, whereby certain newsgroups
- can be selectively excluded from expiry.
-
- NUEXPIRE reads the environment variable WAFFLE to locate the
- /waffle/system/static file. From that file, it determines where the
- waffle files are and where the user directory tree starts. NUEXPIRE
- does not process the 'local' forums description file.
-
- NUEXPIRE uses information in the forum description files in
- /waffle/system for expiry. Proper directory names are constructed from
- the newsgroup definition lines. If an alternate directory is specified
- with /dir, NUEXPIRE uses that directory for that particular group. If
- the /expire flag is set to a numeric value (/expire=5), that value will
- be used for timed expire of that group. The value is the age of the
- article in days. Otherwise, the command-line value will be used.
- Optionally, a graded expire value can be set. Setting /expire=NO ,
- /expire=0 or /expire=NEVER will exempt a group from being expired at
- all. All directory names are adjusted to 8 characters, to allow usage
- on a Novell network.
-
- NUEXPIRE can reference your join file, and expire articles already read.
- This is most useful to a single-user site, and replaces the
- functionality of the older SUEXPIRE.PL.
-
- Newsgroups can be given a grade to simplify administration. A flag of
- /expire=grade5 means that this group will only be considered for expiry
- if the command-line flag -g5 or above is given. The grading system
- works better with the -u option than the -t option, and you cannot use
- the /expire flag to set both a grade and a time limit for the same
- group. If you use -t regularly, consider setting large numerical values
- (like 300 days) for groups you want to protect, or using the -x switch.
-
- ** Installing NUEXPIRE **
-
- Place the NUEXPIRE.PL file in a directory such as /waffle/bin. It is
- invoked with the command line
-
- perl nuexpire.pl <flags>
-
- where flags may be any of the following:
-
- -t x Expire time in days. Expire all articles older than this figure.
-
- -u name Expire according to the join file belonging to user 'name',
- deleting all articles marked as read. Only groups in the join
- file will be expired.
-
- -g x Graded expire. Expire only articles that are graded x or below,
- provided that the article is older than the -t value or is
- marked read in the -u join file. Newsgroups without /expire
- flags and groups with numeric /expire flags are considered grade
- 1, and will always be considered for expiry.
-
- -d Debug mode. Do not delete articles. Instead, each newsgroup
- definition line is printed to STDOUT, followed by any articles
- that are to be expired from that group. This flag is used when
- you are tuning expire paramaters. It's much easier than
- expiring the news spool, inspecting the result, and then
- restoring from a backup. (besides, who backs up news?)
-
- -l file Logfile name. Specifying -l filename will append that filename
- with the name of each article expired. This is a
- limited-usefulness flag, but if you want to maintain expiry
- records, this will do it. Since -l appends to the file, that
- file can get very large, very fast. You may want to read and
- discard it on a regular basis. The -l option is ignored if the
- file cannot be opened. If in debug mode, the file will not be
- appended, but the filename will be shown in the options.
-
- -x list Ignore this group. Any number of groups can be listed after the
- -x flag, and it need not be the last parameter. Thus,
- '-x alt.sources' would cause alt.sources not to be expired at
- all this run, and '-x alt.*' would ignore the alt hierarchy.
- This option is most useful to single-user Waffle installations.
-
- -nuke Expire all news in the news spool. Replace highest-numbered
- articles with 0-byte files. The nuke option overrides all other
- command-line options except debug. Invoking nuke with debug
- will give you a display of what nuke would have done, with D:
- meaning delete, and T: meaning truncate. You must confirm nuke
- from the keyboard.
-
- -autonuke Same as nuke, but you don't get a chance to back out!
-
- -s Compile statistics of what news is on the spool. This option,
- like debug, does not delete articles. Stats are written to
- standard output, and may be redirected into a file.
-
- Flags may be in any order, and the space between a flag and its argument
- is optional. '-u fred' and '-ufred' will work interchangably. You must
- specify either -t, -u or -s.
-
- You may want to create a batchfile to run NUEXPIRE, and place that batch
- file in a directory on your path. Then, NUEXPIRE will be available
- simply by typing the command. Here is an example... edit paths to suit
- your system:
-
- --- expire.bat ---
- c:\mybin\perl c:\waffle\bin\nuexpire.pl %1 %2 %3 %4 %5 %6 %7 %8 %9
- --- expire.bat ---
-
- 4dos users can declare .pl as an executable extension with
-
- set .pl=c:\mybin\perl.exe
-
- and invoke NUEXPIRE without further folderol
-
-
- ** Various information **
-
- NUEXPIRE.PL, by Roy M. Silvernail, is released into the public domain.
- It is presented without any warranty. If the universe explodes, or your
- mother-in-law moves in after using NUEXPIRE, it's your problem.
-
- NUEXPIRE should work on virtually any size news spool. Memory
- requirements have been reduced even below those of PEXPIRE and SUEXPIRE.
- NUEXPIRE will use slightly more memory with the -u flag, since the
- reference join file is loaded into an array. In any case, though,
- NUEXPIRE is a Perl program, and the Perl interpreter itself is somewhat
- large. NUEXPIRE may not run from within Waffle, and it's suggested that
- you run it from the RUN.BAT or manually from the command line.
-
- NUEXPIRE was designed for MS-DOS systems. While it could be used on a
- Unix system, you would have to edit the pathname munging in the fixpath
- subroutine.
-
- NUEXPIRE is in daily use at cybrspc. However, nobody is perfect. If you
- discover a bug, or if you have a suggestion for improvement, please send
- a note to me at roy%cybrspc@cs.umn.edu.
-
- Date of original release: 11/24/91
-