Twig Works

Twig Works is a document-generation platform that compiles PDF and ePub files from a single text source. I use it to prepare my fiction for Kindle Direct Publishing (KDP), Apple Books, and Kobo. It handles text in a proprietary XML format and supports basic inclusion of pictures and illustrations.

Context

Publishing the same work in multiple formats and on multiple platforms can mean maintaining several copies of the original text. Twig Works keeps one master copy and generates the required output formats from it.

My role and contribution

Software engineer. I implemented the application end-to-end for my fiction publication.

How it works

The source text is stored in XML, with configuration in XML and JSON. Publication metadata, paper sizes, font sizes, chapter headers, and other layout options are configurable. PDF files are generated with LaTeX; ePub files are packaged from HTML. Readers can adjust the font size in the ePub output.

Figure 1: Sample page in ePub format as seen in Apple Books.
Figure 2: Example page from a PDF version.

Outcome

The platform is operational and is used to generate files for publishing my own fiction under my own label Urban Volcano. It was designed for that purpose but can be extended to other works.

Technology

Java, XML, LaTeX, ePub, mobi.