Foswiki-to-PDF Makefile
23 Oct 2009At $WORK I've just switched to using Foswiki (formerly TWiki) for documentation. I miss editing files directly from Emacs like you can with Confluence, but I'll get over it. The main reason I like Foswiki is that, at heart, the source files are plain text, and are available as plain text -- no need to trawl through a database.
Another nice feature that Confluence has is the ability to export a space (Foswiki calls it a web) directly as PDF. A bit of scripting takes care of that, but since this is the second time I've lashed together a Makefile to generate a PDF from Foswiki, I figure it's time to post it.
You can find the Makefile here. It uses lynx, wget and htmldoc; of those, I suppose only htmldoc is hard to replace. There's one important assumption built into the Makefile, though: that every page is linked to from the front page of the web, which is how I organize my pages.
Update: Just showed the boss the printed version, and he was very impressed. Yay me! :-)
2 Comments
From: Martin Seibert
24 October 2009 07:59:13
Cool. Thank you for this post. Tweeted about it:
http://twitter.com/Foswiki/statuses/5118728643
More of that, please! :-)
Best regards
Martin Seibert
From: Oliver Kruger
24 October 2009 14:20:23
There are actually quite a few approaches to this issue in the Foswiki Extension Web (http://foswiki.org/Extensions/): PublishPlugin, ToPDFPlugin, GenPDFWebkitPlugin and some more. The main difference among these: their (dis-)ability to cope with CSS, tables and/or images.
Afaik all of them use an external program like htmldoc. If I remember correctly from discussions with some developers of those plugins, htmldoc is not the best choice.
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018