Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Epub generation



It is possible to generate a Epub document rather than an HTML site. You need to set the following command-line argument or configuration property:
  • "outputType" set to "epub"

Configuration


There are specific properties used for the document generation.

Generation algorithm

By default the generator will generate:
  • One introduction chapter with only the content of the index file
  • One chapter for each category
  • For each category, one sub-chapter for each article in the category. Each article will however be only in one chapter, even if it is in more than one category
It is possible to configure the structure of the Epub document by specifying the "chaptersContent" property. See Document content specification.

Configuration

A few specific properties or arguments allow to specifically configure the generation for the PDF format:
  • "fileName": The Epub file will be generated in the output directory. By default the name of the file will be "wiki.epub", but this property allows to change the name of the file
  • "docFile": the path of the Epub file. In that case the output directory will be the parent directory of this file
  • "cover": the path of the cover image for the document
  • "defaultChapter": the name of the default chapter, used for articles which belong in no category
  • "chaptersContent": the path of an XML file allowing to configure much more precisely the structure of the Epub document. See Document content specification.

Limitations

There are a few limitations compared to the HTML result:
  • resource elements don't link to their associated resource content
  • Internal wikilinks on img elements are not taken into account
  • Each article is only present in one category

Example

      java -jar docGenerator.jar -input=wiki/input -output=wiki/output -outputType=epub

Example of generation with ant

  <java classname="org.docgene.main.DocGenerator">
     <arg value="-input=wiki/input"/>
     <arg value="-output=wiki/output"/>
     <arg value="-fileName=docGeneratorWiki"/>
     <arg value="-chaptersContent=docContent.xml"/>
     <arg value="-outputType=epub"/>
     <classpath>
        <pathelement path="docGenerator.jar"/>
     </classpath>
  </java>

See also


Categories: configuration | epub | plugins

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.