Differences between revisions 1 and 2
Revision 1 as of 2008-02-20 08:24:34
Size: 2405
Comment:
Revision 2 as of 2010-03-17 13:13:02
Size: 2407
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
In the trunk of the {{{doms}}} [http://merkur/svn/doms/trunk/bin/ repository] the {{{moinmoinbook}}} script is located in the {{{bin/}}} directory. In the trunk of the {{{doms}}} [[http://merkur/svn/doms/trunk/bin/|repository]] the {{{moinmoinbook}}} script is located in the {{{bin/}}} directory.

Creating Books from MoinMoin Pages

In the trunk of the doms repository the moinmoinbook script is located in the bin/ directory.

To get usage instructions run it without any arguments

bin/moinmoinbook

Compiling a Book

Here follows a step-by-step guide to create a book from a collection of MoinMoin pages.

1. Make Sure dblatex is Installed

Make sure that the program dblatex is available on your command line. It is normally found in the package called dblatex. Note that this is not the same as db2latex which is an outdated an unmaintained version of a tool doing roughly the same thing.

2. Write a .book File

To generate your book you need to tell moinmoinbook what pages you want in the book. This is done via an input file in the following format.

# This is a sample .book file
# as you might guess, '#' marks a line as a comment

#
# lines starting with '@' are metadata embedded in the 'bookinfo'
# tag of the compiled docbook. The following three should be the ones
# of primary interest.
#
@title=DOMS test Book
@authorgroup=<author><firstname>John</firstname><surname>Doe</surname></author>
@copyright=<year>20077</year><holder>Statsbiblioteket</holder>

#
# A list of pages to include (in that order)
#
http://merkur/domswiki/LoggingGuidelines
http://merkur/domswiki/ExceptionGuidelines
http://merkur/domswiki/Javadoc_Guidelines
http://merkur/domswiki/PropertyGuidelines
http://merkur/domswiki/QA_Guidelines
http://merkur/domswiki/i18n
http://merkur/domswiki/Script_Guidelines

Now save the file as myBookFile.book

3. Compile the Book

To compile the book simply run

bin/moinmoinbook --user=mylogin --password=mypassword myBookFile.book

This will produce myBookFile.book.pdf if all goes well.

Caveats

WGet Tricks

You can pass arguments to the underlying wget operations like in step 3. above. Any arguments comming before the .book file are passed verbatim to wget.

Images

moinmoinbook will handle inlined images and emoticons. However you must include images with a plain URL, ie. not enclosed in square brackets. Ie do not:

[http://example.org/party.jpg]

but do

http://example.org/party.jpg

MoinMoinBook (last edited 2010-03-17 13:13:02 by localhost)