Twig Works is a document generation platform for compiling both PDF and ePub files from a single text source. The project is operational for generating the necessary files for publishing my own works of fiction on various platforms, including Kindle Direct Publishing (KDP), iTunes (Apple Books), and Kobo. It handles text in a proprietary XML format and supports basic inclusion of pictures and illustrations. While purpose made for my own works of fiction it is extendible to other works.
When publishing on multiple platforms and multiple formats it can be tedious to make multiple copies of the original text for each platform. In that case content changes have to be made simultaneously across all content copies. With Twig Works there is only one master copy of the content and the software takes care of transforming the source to the desired output, be it PDF or ePub. The software is written in Java, the content is stored in simple XML files and the configuration in a mixture of XML files and JSON files.
The software is configurable to include all standard meta-data attributes needed for publication on main distribution platforms. It includes configurable paper sizes, font-sizes, chapter headers, and other basic layout options. The ePub files allow the reader to control their desired font-size.
The PDF files are generated using the LaTeX PDF generation software and the ePubs generated by a standard packaging of HTML files.


Technology
Java, XML, LaTeX, ePub, mobi.