mhonarc-users

Re: Tool to break archive into sections over time?

1996-03-11 15:41:39
Prentiss Riddle said:
Nancy McGough and Achim Bohnet touched on this subject a while back,
but neither posted a solution.

My solution requires some work/time I did not have up to know :-( The
solution (for me) would be to make the index stuff dymanic. I thought 
about

        - mhonarc option to update only .mhonarc.db (no HTML files
          are created)
        - add an hash to .mhonarc.db that contains
                dirname/number  # for mh messages
                mboxname/offset # for mbox files

With some generalization to the index generation routines it should
then be easy to produce indexes on the fly) as you could already for
messages).

Does anyone have a script they'd be willing to share which automates
the doling out of MHonArc archives into separate sub-archives over time?

At a minimum, I'm thinking of a cron job which wakes up on the first
day of every Nth month and does more or less the following:

    -- Creates a new subdirectory for the current period, entitled
       perhaps "YYYYMM"
    -- Initializes the main and threaded indexes of the new
       subdirectory
    -- Adds a link in the top-level HTML file to the main and threaded
       indexes of the new subdirectory.
    -- Creates a symlink called "current" linking to the "YYYYMM"
       subdirectory (so that new messages can always be added to
       "current")

It looks like something of this sort must be in place for the archive
of the "mhonarc" mailing list:

    http://www.rosat.mpe-garching.mpg.de/mailing-lists/mhonarc/

I do something like that to manage the mhonarc list (triggered by procmail
for each mail):

list=mhonarc
archive="/mailing-lists/$list/`/usr/bin/date +%y%m`"
if [ ! -d $archive ]; then
        mkdir $archive
        ... # do whatever you want
        mhonarc -rcfile mycustom -outdir $archive ...
else
        mhonarc -outdir $archive ...
fi

Achim

Has anyone got a script handy to automate it?  Thanks.

-- Prentiss Riddle ("aprendiz de todo, maestro de nada") 
riddle(_at_)rice(_dot_)edu
-- RiceInfo Administrator, Rice University / http://is.rice.edu/~riddle
-- Home office: 2002-A Guadalupe St. #285, Austin, TX 78705 / 512-323-0708



<Prev in Thread] Current Thread [Next in Thread>