Question

I want to write eBooks using Git as version control software. Since neither Git supports .epub files (at least not diff-able) nor Sigil or Calibre supports any kind of using an eBook as "project" (folder with containing files), I wanted to ask you how I could achieve this, if it's possible at all. Since an .epub file is nothing more than a collection of folders and files, I don't see any problems with this, but I just can't find anything on Google...

Edit: Since I rather work with HTML and CSS files, I created my own solution for this problem: With EpubCreator you are now able to place all your .epub files into the src/ folder. As soon as you want to view your work up to now, you just can run the index.php script, which will in first instance assemble an .epub file from source and save it into the bin/ folder. After that, it will call the just created .epub file and display it in your browser. It should then look like this: enter image description here There are now plugins or so needed, the displaying is achieved with epub.js, another project on GitHub (if you are interested, it is linked in the LICENSE.md in my project). I hope this helps anybody. Also, as I often make ebooks, I will keep on with the work. This is now about 6 hours of work, I hope I will be able to improve it a lot. Thanks for your tips and inspiration.

Was it helpful?

Solution

It is best to write your book in a text format (that Git can easily stored), and generate the target format from those sources.

The article "Publishing eBooks with AsciiDoc" illustrates that process, using asciidoc format (text) to generate epub.
It uses the a2x toolchain manager for the generation:

a2x -fepub -dbook minimal-book.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top