mhonarc -add
-quiet -outdir /path/to/html_archive/$year
, where $year
is the four-digit year).
However, that rc-file does not care about special settings for
the archives; it simply assumes that you either create the
configuration file(s) for MHonArc manually, or use its default
settings.
Here, I am presenting my way of automating this process. It
consists of a set of M4 files, plus a shell script for updating
the per-year directories. (M4 is a
macro processor, i.e., something like the C preprocessor, but
with a different syntax, and more powerful.) The script assumes
the GNU version of M4 because GNU M4 knows the options -I
(directory for include
instructions) and
-D (define a symbol).
1999
, 2000
, etc.). Further
directories, e.g. for archiving administrative mails (like the
subscription confirmation), may be added.
the_years
that gives the names
of those sub-directories. If it is missing, all directories
with 4-digit numbers as their names are used, so you only need
it if you have additional directories.
RCFILE.m4
,
giving the title to use for the
archive index files (a name or short description of the
list). It also tells M4 to use curly brackets (i.e., { and })
as "quote characters".
the_years
above), and a file with
this name and additional suffix .m4 must be in the main
directory.
<IDXFNAME>
resource of the resource
file given in the first field. It is used to create a
link to this index in the year overview included by the
webserver index file.
subject.mrc subject.html by subjectthere must be a file
subject.mrc.m4
in the main
directory of the archive. From this, files
2000/subject.mrc
, 2001/subject.mrc
,
etc. will be created. The year overview will contain the text
"2000 by subject", linking to 2000/subject.mrc
.
See years.html for the result.
$HOME/public_html/mailinglists/listname/year
),
you may find it convenient that you can store most of the m4 files
in the (common) parent directory of the list's main directories,
in my case, in $HOME/public_html/mailinglists
(that's
the reason for -I.. in M4 invocation in the shell script).
So, all that' missing is the shell script that takes all
these files and does "the magic". It is invoked in the main
archive directory, with one argument that indicates the language
of the list. Some of the m4 files above have names
something_en.m4
. I also have
something_de.m4
for German lists. For the
English lists, I call update_compact en
, for the
German lists I call update_compact de
.