Hi,
here is a description of my latest changes to HyperArchive for HyperMail
archiving.
Available at http://www.ns.aus.com/download/hyperarchive.tgz
HyperArchive
Richard Sharpe
2-Apr-1997
sharpe@ns.aus.com
1.0 Introduction
There appeared to be a need for a facility to help with creating hypermail
archives for mailing lists.
To fill that need I created HyperArchive, which consists of two things:
- harchive2.pl, a modified Majordomo archive2.pl which calls hypermail on
the fly in a safe fashion to build hypermail archives of mailing list
mail, and includes some useful extensions around the archive periods that
can be used.
- hyperarchive, a CGI script that provides a front end to the hypermail
archives. It allows system managers to customise to a great extent the
way in which the actual archives sets are displayed.
HyperArchive is available at:
http://www.ns.aus.com/download/hyperarchive.tgz
Subsequent sections describe each component in more detail.
2.0 harchive2.pl
This perl script is an extension of archive2.pl. Archives are written to the
directory specified by the -f flag to harchive2.pl. They are witten as
directories in the format:
all for a single arhive where no period flag is specified
97 for a year long archive for 1997
9704 for the month of April, 1997
9703-04 for the months of March and April, 1997
It takes the following extra flags over and above those accepted by
archive2.pl:
. -Dnn where nn is a number of days. The archive is created as yymmdd-mmdd
in the directory specified by the -f flag
. -Mn where n is a number of months. The archive is created as yymm-mm
in the directory specified by the -f flag
. -Yn where n is a number of years. The archive is created as yy-yy
in the directory specified by the -f flag
In addition, it uses lock files to synchronize multiple instances of
harchive2.pl that may be operating on the same achive, since sendmail will
start up as many as it needs.
If it finds a .descrip file in the directory specifed by the -f flag, the
contents of this file will be passed to hypermail as the description of the
archive. It should contain something short like: HyperArchive Mailing List.
If it finds a .info.html file in the directory specified by the -f flag, the
name of that file will be passed in as more information on the archive via the
-b flag.
Finally, since it is running as Majordomo, the archive directories and files
do not need o+w permission, improving the security of your archives.
3.0 hyperarchive
This CGI script in perl acts as a front end to the hypermail archives. It is
invoked as
http://your.host/cgi-bin/hyperarchive
or as
http://your.host/cgi-bin/hyperarchive?archive
If invoked using the first form, it lists all the hypermail archives set up
using HyperArchive at your site. If invoked using the second form, it lists
the hypermail archives for that hyperarchive.
In each case it looks for and displays the following three files:
.main-head This file must contain valid HTML and is sent to the client
first up. It could contain a description, graphics, whatever.
.list-pre This file must contain valid HTML and is sent to the client
just before the archives are listed. It might format the page
as a two column list with some comments in the left hand
column and the list proper in the right hand column
.list-post This file must also contain valid HTML and is sent to the client
after the archives are listed. It would properly terminat the
HTML and may contain trailing comments.
4.0 To Do
If there is sufficient interest, the following could be done:
- Convert to a better parameter passing mechanism, eg hyperarchive?parm=val
so that extra functionality can be implemented. Ie, searching, etc.
Regards
-------
Richard Sharpe, sharpe@ns.aus.com
NS Computer Software and Services P/L,
Ph: +61-8-8281-0063, FAX: +61-8-8250-2080, WWW: http://www.ns.aus.com
NS is an OS-neutral, equal-HTTP-server opportunity employer!
|
|