How can I create an ebook from existing HTML files?

By | March 18, 2017

I will be writing software that allows me to select stretching exercises, put them in order, and then create an ebook, one per page, and then use it on my kindle. I was hoping that my software could produce the final ebook, e.g., mobi, but that seems unlikely (I can't find the spec for the file format).

So my next idea is to produce a set of HTML files, a table of contents file, and manually use Calibre to convert it to mobi/azw and upload it to my kindle.

I did the HTML part once years ago by creating the HTML files by hand so it should work. But I was wondering if there is a better way?