.gitignorecommits | blame
GotMArc.pmcommits | blame
Makefilecommits | blame
READMEcommits | blame
filter-export*commits | blame
filter-ignore*commits | blame
foot.htmlcommits | blame
got.pngcommits | blame
gotmarc*commits | blame
head.htmlcommits | blame
index-header.htmlcommits | blame
logo-small.htmlcommits | blame
mexp*commits | blame
mkindex*commits | blame
pe*commits | blame
style.csscommits | blame


GOTMARC -- because $POPULAR_ARCHIVE hates us!

A collection of scripts to generate a static mail archive from a
Maildir; intended to provide a public web interface for the Game of
Trees mailing list.

The dependencies are:

 - mblaze
 - imagemagick (to resize the got logo)

How it works

The makefile uses mlist(1) to gather all the mail of the mailing list,
mthread(1) for threading and mscan(1) for parsing.

Then, three custom scripts are called:

 - mexp: creates a separate HTML page for each mail, as well as the
   raw message/body parts and the attachments.  It's the heaviest part
   of the pipeline.  If a message appears to have already been exported,
   it will be skipped to save some time.

 - pe: (parallelized export) since mexp is slow, attemps to run N mexp
   processes in parallel and dispatch threads to them.

 - mkindex: generates the index and threads page.


	$ make MDIR=/path/to/got/maildir

will create and populate a `/var/www/marc' directory with the HTML
files.  Pass OUTDIR to override the destination directory.  MDIR
defaults to ~/Mail/gameoftrees.

There's some basic support for parallelizing the export, although it's
disabled by default.  Tweak MAKE_JOBS for `pe' to use multiple jobs.

Every once in a while, the maildir should be synced (with mbsync for
example) and `make' re-run to update the archive.  gotmarc does
incremental updates to some extent so except for the first run, which
will take a while, updating the archive should be fast.

For use with httpd' `gzip-static' (or similar)

	$ make gzip

will recursively compress every file in OUTDIR, leaving the original
file intact.


As far as I'm concerned, gotmarc (i.e. all the code in this
repository) is in the public domain.