grotsztaksel / Songbook_XMLtoEPUB

Set of Python tools Creating an ePub songbook from data defined as XML files
Apache License 2.0
1 stars 0 forks source link

Songbook XML to ePub

This project offers a suite of tools allowing automated transformation of a songbook defined in an XML file, or set of files into a form of EPUB compliant HTML files[^1]. These can then be converted into an eBook by other tools[^2]. I found PDF files inconvinient on my e-Book reader and I wanted to store my collections of songs in a repository[^3], so that the whole songbook can easily be updated with regard to content and behavior.

The tools allow the resulting songbook have a table of contents, alphabetic indexes of songs and authors, links between songs, chords presented in a prefered way (above the verse lines, or beside it) etc. It even allows adding custom HTML pages to the compilation: this was meant as a way to add pages formatted differently than a song - some notes, interesting history associated with the song; I used this feature to contain tables of guitar chords at the end of the songbook; theoretically one could use it to ePub the entire collection of Shakespeare's works, should more convinient tools for such purposes be not available.

Requirements

Setup for dummies (Like myself)

  1. Download & install Anaconda
  2. Launch Anaconda Command Prompt (on Windows) and type:
    conda create --name py37 python=3.7 pip
    conda activate py37
  3. Install Tixi following these instructions:
    conda install -c dlr-sc tixi3

Footnotes

[^1]:I am not familiar with the whole ePub standard or requirements. "EPUB compliant" means that I reverse engineered an example EPUB file and defined a set of files essential for successful creation of an eBook looking and behaving good on my Kindle Paperwhite.

[^2]: I found Calibre particularly useful: note it has a command line mode that can easily be used in an automated way along with this

[^3]: To stay on the safe side of the copyrights of the song authors I will not publish my collection of songs.