How do I convert a text file to the EPUB format?

Happened upon this thread many moons later.

Just liked to point out there is a command line tool Calibre uses to convert. It's called (surprise, surprise) ebook-convert. See 'ebook-convert -h' or 'ebook-convert dummy.html .epub -h' to see conversion options for converting html to epub.

Haven't explored it though. I am most curious about --list-recipes (and if it works), it looks as somethings interesting.


I'd say, Calibre is for you. It works on Linux, Mac OS X, and Windows.

Input Formats: CBZ, CBR, CBC, EPUB, FB2, HTML, LIT, MOBI, ODT, PDF, PRC**, PDB, PML, RB, RTF, TXT

Output Formats: EPUB, FB2, OEB, LIT, LRF, MOBI, PDB, PML, RB, PDF, TXT


For the Mac OS X and Windows, I have had success with Stanza for Desktop.

This supports a good range of export formats.

More importantly, it copes very well with

  • detecting chapters in large text files.
  • unicode, including "significant" characters like < and &.

There are online tools to convert to epub files.

Example of such a website here.


If you have a MacOS X 10.6 machine, try this:

http://padilicious.com/epub/index.html

It relies on Automator