What is an eBook Standard?
EPUB is without doubt the industry standard for eBooks, or is it?
- Amazon, by far the largest producer of eBooks on the planet don’t use EPUB.
- Authors don’t write in EPUB.
- Project Gutenberg saves books in plain text because it is more future-proof than the current EPUB standard.
What should an eBook Standard accomplish?
EPUB is vital as a standard for eBook reader software. Amazon’s mobi/KF8 is another standard although a proprietary one. These standards for reader software are very important and must remain.
What is needed is a single common standard for eBooks, as opposed to eBook reader software. Requirements for a eBook description standard are:
- human and machine writable
- machine and machine readable
- open source
- simple enough to still be working 10 years from now
EPubChef provides a strong starting point for such as standard.
EPubChef includes a new method of describing eBooks.
The description is machine readable, human writeable, tremendously flexible and based on plain text. This combination allows for EPUBs to be created easily by authors and those that support them, but also, crucially, EPUBs can be re-generated from source at multiple stages in the eBook lifecycle. Over time, eBook readers will evolve. EPubChef allows for simultaneous evolution of the eBook itself without the sort of major rewrites required when migrating from EPUB 2 to EPUB 3.
How does it work?
An eBook in ePubChef consists of three parts:
- A RECIPE – metadata, chapter information
- TEMPLATES – configurable HTML and CSS layout
- TEXT OF THE BOOK – in multiple plain text files
The RECIPE contains meta-data (Author, ISBN, etc.) as well as chapter names, front and back matter all of which is personalized by the author. The recipe can also be altered on the fly at point of sale if desired, adding purchaser/reader specific items into each individual eBook copy.
The templates (HTML and CSS) define the look of the book, such as the layout for the start of each chapter. The TEMPLATES can be used “out of the box”, or modified.
The book text is held in multiple, future-proof plain text files. Standard Markdown or HTML can be used in the text where needed for bold, italics, lists, etc..
Show me an example please.
Visit https://github.com/ePubChef/ePubChef/tree/master/demo_raw on GitHub to see an example. Wrapped around the demo_raw directory is the templates and css directories, both of which can be altered by the user.
Notice how the demo_recipe.yaml contains an “intro” and “photo” for each chapter. The values of these fields are injected into templates/chapters.xhtml. If a new field “quotation” were desired, the same pattern would be followed.
EPubChef follows standard practices for web site creation allowing those with basic web skills to customize eBooks. The complexity of EPUB is encapsulated and hidden in the code (cook.py).
I propose that ePubChef provides an excellent starting point for such an eBook description standard. The ePubChef code is a working implementation which demonstrates generation of an EPUB from the human writable description.