Seth Kenlon

Authored Comments

You assume that I'm using the word "beg" archaically! join my gang of modernist grammarians and you too can abuse myriad ancient phrases.

Yep, I agree with Jason. Pandoc makes it pleasantly simple to convert HTML to epub.

It's easiest if all your html is in one file, but that is not always the case, so you might have to point pandoc to each file...

Assuming a Linux shell:

$ pandoc -f html -t epub3 index.html preface.html chapeter1.html chapter2.html -N --epub-stylesheet=stylesheet.css --epub-metadata=metadata.xml --epub-cover-image=cover.jpg --epub-embed-font=liberation.ttf --epub-embed-font=Nouveau_IBM.ttf -o mybook.epub

The stylesheet is optional, and the metadata file is something you would need to generate manually. It doesn't need to be at all complex:

$ cat metadata.xml
Book of Foo and Bar
Seth Kenlon

The result will be an epub that appears in any ebook management software as "Book of Foo and Bar" by "Seth Kenlon", and in your filesystem as "mybook.epub".

I use this kind of command fairly regularly; I pull a directory off of the web and convert the pages to ebook so that I can read it whilst offline. I'm reading the GNU Gawk manual in exactly this way.
Hope that helps.