Blame


1 b2508be5 2022-08-24 op GOTMARC -- because $POPULAR_ARCHIVE hates us!
2 b2508be5 2022-08-24 op =============================================
3 b2508be5 2022-08-24 op
4 b2508be5 2022-08-24 op A collection of scripts to generate a static mail archive from a
5 b2508be5 2022-08-24 op Maildir; intended to provide a public web interface for the Game of
6 b2508be5 2022-08-24 op Trees mailing list.
7 b2508be5 2022-08-24 op
8 b2508be5 2022-08-24 op The dependencies are:
9 b2508be5 2022-08-24 op
10 b2508be5 2022-08-24 op - mblaze
11 b2508be5 2022-08-24 op
12 2c580f18 2022-08-29 op Optionally, ImageMagick is used to regen the various sizes of the got
13 2c580f18 2022-08-29 op logo in images/.
14 b2508be5 2022-08-24 op
15 2c580f18 2022-08-29 op
16 b2508be5 2022-08-24 op How it works
17 b2508be5 2022-08-24 op ------------
18 b2508be5 2022-08-24 op
19 7067473a 2022-08-24 op The makefile uses mlist(1) to gather all the mail of the mailing list,
20 7067473a 2022-08-24 op mthread(1) for threading and mscan(1) for parsing.
21 b2508be5 2022-08-24 op
22 1c159d06 2022-08-26 op Then, three custom scripts are called:
23 b2508be5 2022-08-24 op
24 b2508be5 2022-08-24 op - mexp: creates a separate HTML page for each mail, as well as the
25 7067473a 2022-08-24 op raw message/body parts and the attachments. It's the heaviest part
26 7067473a 2022-08-24 op of the pipeline. If a message appears to have already been exported,
27 7067473a 2022-08-24 op it will be skipped to save some time.
28 b2508be5 2022-08-24 op
29 57784939 2022-08-25 op - pe: (parallelized export) since mexp is slow, attemps to run N mexp
30 57784939 2022-08-25 op processes in parallel and dispatch threads to them.
31 57784939 2022-08-25 op
32 b2508be5 2022-08-24 op - mkindex: generates the index and threads page.
33 b2508be5 2022-08-24 op
34 b2508be5 2022-08-24 op
35 b2508be5 2022-08-24 op Usage
36 b2508be5 2022-08-24 op -----
37 b2508be5 2022-08-24 op
38 b2508be5 2022-08-24 op $ make MDIR=/path/to/got/maildir
39 b2508be5 2022-08-24 op
40 19a4c72c 2022-08-26 op will create and populate a `/var/www/marc' directory with the HTML
41 19a4c72c 2022-08-26 op files. Pass OUTDIR to override the destination directory. MDIR
42 19a4c72c 2022-08-26 op defaults to ~/Mail/gameoftrees.
43 b2508be5 2022-08-24 op
44 408edb25 2022-08-26 op There's some basic support for parallelizing the export, although it's
45 1c159d06 2022-08-26 op disabled by default. Tweak MAKE_JOBS for `pe' to use multiple jobs.
46 1c159d06 2022-08-26 op
47 5f54ec1a 2022-08-24 op Every once in a while, the maildir should be synced (with mbsync for
48 5f54ec1a 2022-08-24 op example) and `make' re-run to update the archive. gotmarc does
49 5f54ec1a 2022-08-24 op incremental updates to some extent so except for the first run, which
50 5f54ec1a 2022-08-24 op will take a while, updating the archive should be fast.
51 5f54ec1a 2022-08-24 op
52 b2508be5 2022-08-24 op For use with httpd' `gzip-static' (or similar)
53 b2508be5 2022-08-24 op
54 b2508be5 2022-08-24 op $ make gzip
55 b2508be5 2022-08-24 op
56 b2508be5 2022-08-24 op will recursively compress every file in OUTDIR, leaving the original
57 b2508be5 2022-08-24 op file intact.
58 2215cb0b 2022-08-24 op
59 2215cb0b 2022-08-24 op
60 2215cb0b 2022-08-24 op License
61 2215cb0b 2022-08-24 op -------
62 2215cb0b 2022-08-24 op
63 2215cb0b 2022-08-24 op As far as I'm concerned, gotmarc (i.e. all the code in this
64 2215cb0b 2022-08-24 op repository) is in the public domain.