EPublish: Create EBook-ready EPUB from HTML
If you are comfortable with basic HTML and want an easy way to publish your ebook, then EPublish may be what you are looking for. It is a command-line tool to convert HTML, CSS, and images into an ebook ready for uploading to self-publishing sites like Amazon's Kindle Direct Publishing. Once you have an EPUB file, you can convert it to a print-ready PDF using Calibre or other tools.How Does It Work?
It's easy, create an HTML document using any HTML editor. Keep the formatting simple, like follows:<img class="cover" src="cover.jpg"/> <img id="title" src="title.png"> <img id="asterism" src="asterism.png"> <h1>Title<br><br>Author</h1> <h2 class="Content">Chapter 1</h2> <p> Chapter 1 Text here (before section break) <hr/> Chapter 1 Text continues after section break <h2 class="Content">Chapter 2</h2> <p> Chapter 2 <h2 class="Post">Acknowledgments</h2> <p> Acknowledgments hereThere are more options to customize your book that we'll cover later.
How Do I Run It?
java -cp epublish.jar com.frequal.epublish.App novel.html --style ProdThis will convert
novel.html to novel.epub using the "production" style, which is what you want if you are uploading the EPUB file to an online ebook publisher.
What Does It Do?
It makes an attractive, well-typeset EPUB file from your HTML manuscript.Some of the things it handles automatically:
- Widely-compatible EPUB file that works with Kindle, Apple Books, Calibre, and more
- Automatic insertion of cover and title pages before Content
- Title image used, if present
- Title from
h1tag if no title image
- Automatic copyright page generation
- Automatic table of contents
- Font embedding, if provided
- Drop Caps
- Asterisms in place of
hrtags- Standard asterisk asterisms if no asterism image provided
- Custom asterism image if provided
- Three types of pages for different needs
- Pre and Post content for final EPUB
- Content for all versions
- Promo content for promotional chapters
- Automatically cleans up characters and typography
- Automatic smart quotes
- Automatic em dashes from
--
Modes
EPublish supports 3 output modes:- Prod: Generates a ready-to-publish ebook in EPUB format
- Draft: Generates a draft copy, without Pre or Post matter, just the contents, for reviewers
- Promo: Generates a promotional copy, without Pre or Post matter, but with any Promo chapters
Options
-
--style [Prod|Draft|Promo]: The output mode -
[chapterCount]: The number of chapters to export
Copyright © 2026 Andrew Oliver