Exporting to docbook is of primary interest for the HOWTOs, because this allows the use of the old, very well tuned, toolchains for HOWTO publishing of the LDP. see LDP_data_flow

MoinMoin docbook export

Exporting

This should be done only by the Author or a seasoned LDP member and after writing to the discussion list for review. In the easier case this is:

problem: '''`''' (used to quote) is translated to "code" in docbook and the LDP script don't like it. In html translation the result is this text in red and some spacing problems.

Managing Images

Images are not converted. HOWTOs with images are stored in the CVS in a directory with the same name as the HOWTO. The images can be stored at the same level as the HOWTO (usually if there are few of them), or in a subdirectory named "images" if there are many. The author chooses.

The author can save the images in this folder before uploading them to the wiki, but if an other people do the conversion, he have to first download all the images from the attachments page to have them at hand.

In this case, it's better to submit the HOWTO through CVS or to send an archive to the submit list. If the images are big, the archive have to be uploaded somewhere, letterboxes are not made to receive multi megabytes mails.

Manual Editing

Moin docbook export works pretty well, but some manual editing is necessary to have a good xml document for LDP use. We can do this for you, simply ask to have your HOWTO published and give us the Wiki link.

"Kate" is very good to edit the xml file. Better use tidy first, however.

Using "tidy" to pretty print the xml code can make life easier (but verify if this don't kill the code);

tidy -xml -i -o test2-ti.xml test2.xml

For example.

Adding the Author tag

<author>
      <firstname>Your Given Name</firstname>
      <surname>Your Family Name (Surname)</surname>
      <authorblurb>
        <para>A short sentence about who you are.</para>
      </authorblurb>
      <affiliation>
<!-- The name of your organization is optional. -->        <orgname>
          <ulink url="http://www.URL.com" >company name</ulink>
        </orgname>
<!-- A valid email is required. You may add a spam blocker, or get a Yahoo/Gmail/etc account. -->        <address>
          <email>youremail@domain.NOSPAM.org</email>
        </address>
      </affiliation>
    </author>

Can be added at the top of the <articleinfo> first tag. Of course you need to change what is meaning full for You.

Trying the result

On our servers we have special scripts, but they are difficult to use elsewhere. At home, you can use "xmlto" to get a result. The syntax is very simple:

xmlto html documentname or xmlto pdf documentname

and you should find it in any good distribution.

Editing the formatter

On nov 12, 2008, I (jdd) edited the formatter script to fix this problem (replaced twice 4.4 by 4.2).

The file is in moin@reggae:~$/MoinMoin/formatter/text_docbook.py. I have kept a backup in the underlying _test folder. It will probably be necessary to do it again after updates. see the source.

However, present (nov 12, 2008) ibiblio configuration don't allow for text exporting (no w3m available), but we can manage this manually.

HOWTO Name

The docbook file must have the very same name as the previous HOWTO (if any) in the LDP collection, else the HOWTO will be duplicated.

Allowed tags

We still have to list the Moin tags that are correctly translated. Right now, jade (the docbook processor) gives an un-understood "code error", but formats the HOWTO nicely.

Exporting_to_docbook (last edited 2009-05-26 12:33:29 by jdd)