Creating .epub files in Python - Part 2: Formatting the data