Description

It would be useful if a series of wiki pages could be exported as a single DocBook file (book). For that purpose, a certain type of page could be created that represents the table of contents of the project as a nested list of links to the individual wikipages that are to be part of the book. This would to some degree resemble the functionality to the *Group pages. All links to pages that are not listed on the project page should be removed from the resulting DocBook file. Here is an example of how this could look like:

#docbook author Michael Kaiser
#docbook dedication To my parents
= On Nature =

The mares, which carry me as far as my heart desires, were escorting me. They brought and placed me upon the well-spoken path of the Goddess, which carries everywhere unscathed the mortal who knows. Thereon was I carried, for thereon the wise mares did carry me, straining to pull the chariot, with maidens guiding the way. The axle, glowing in its naves, gave forth the shrill sound of a musical pipe, urged on by two rounded wheels on either end, even whilst maidens, Daughters of the Sun, were hastening to escort me, after leaving the House of Night for the light, having pushed back the veils from their heads with their hands.


 * [:/Introduction: Introduction]
 * [:/ChapterOne: Chapter 1]
 * [:/ChapterTwo: Chapter 2]
  * [:/ChapterTwoOne: Chapter 2.1]
  * [:/ChapterTwoTwo: Chapter 2.2]
 * [:/AndSoOn: And so on]
 * [:/Appendix: Appendix]

Then there should be a tool (lets call it docbook-export) that creates an proper DocBook file that includes all the pages given in the table of contents (i.e. nested list) on that project page.

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<book>
<title>On Nature</title>
<bookinfo>
  <author><firstname>Michael</firstname><surname>Kaiser</surname></author>
</bookinfo>
<dedication>
<para>
To my parents
</para>
</dedication>
<preface><title>Preface</title>
<para>
The mares, which carry me as far as my heart desires, were escorting me. They brought and placed me upon the well-spoken path of the Goddess, which carries everywhere unscathed the mortal who knows. Thereon was I carried, for thereon the wise mares did carry me, straining to pull the chariot, with maidens guiding the way. The axle, glowing in its naves, gave forth the shrill sound of a musical pipe, urged on by two rounded wheels on either end, even whilst maidens, Daughters of the Sun, were hastening to escort me, after leaving the House of Night for the light, having pushed back the veils from their heads with their hands.
</para>
</preface>

<chapter><title>Chapter 1</title>
<para>
Include the \ChapterOne page here
</para>
</chapter>

<chapter><title>Chapter 2</title>
<para>
Include the \ChapterTwo page here
</para>
<sect1><title>Chapter 2.1</title>
<para>
Include the \ChapterOne page here
</para>
</sect1>
<sect1><title>Chapter 2.2</title>
<para>
Include the \ChapterOne page here
</para>
</sect1>
</chapter>

<chapter><title>And so on</title>
<para>
Include the \AndSoOn page here
</para>
</chapter>

<appendix><title>Appendix</title>
<para>
And finally, include the \Appendix page.
</para>
</appendix>
</book>

This feature would be of interest for users that want to create and maintain larger technical documents (manuals etc.) in a wiki since they are usually spread over several wiki pages but need to go into one file when they are published. This could also be extended to the export LaTeX files and other means of structured documents as well.



-- Michael Kaiser

There is already a docbook parser/formatter. I'm not sure how docbook formatting should work, but you need code that iterate over the pages in the "project" page, then either render all of them and send combined output, or maybe compile all of them into one source and format it.

If the needed output is multiple rendered documents, you can collect all of them into a compressed tar file on the fly, and send the tarball file to the browser, see WikiBackup action.


This will be solved as part of my SummerOfCode project: http://fedoraproject.org/wiki/SummerOfCode/2006/MikkoVirkkil%C3%A4 -- Mikko Virkkilä


CategoryFeatureRequest

MoinMoin: FeatureRequests/DocBookProject (last edited 2007-10-29 19:06:00 by localhost)