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

12

7

I have a bunch of book length text files I'd really like to read on my EPUB reader (as it happens FBReaderJ). What would be the best route to convert them?

I have access to Mac OS X and Linux (Ubuntu). Probably happiest with a command line, but would setting for a GUI for batch conversion.

My criteria for success are really based upon the shortfalls I have found with Calibre

  • must do the whole book
  • at least a guess of what the title/author may be. Minimum the source filename for the title.
  • hygienic with files it uses - tidies up after itself (this is less important)
  • doesn't try to be an all-in-one library manager (again, less important).
  • is lenient in parsing special characters (e.g. < and & characters).

jamesh

Posted 2009-09-02T21:57:34.733

Reputation: 449

Answers

4

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 &.

jamesh

Posted 2009-09-02T21:57:34.733

Reputation: 449

11

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.

Hrannar Jonsson

Posted 2009-09-02T21:57:34.733

Reputation: 111

https://gist.github.com/AaronO/9962667

Found this gist detailing how to get it to work using Brew. It seems a little funny that it's not available for install without Calibre.

– counterbeing – 2015-04-25T19:13:15.400

Here's how to install it on macOS: brew cask install calibre. And then use: ebook-convert path/to/input_file.input_format path/to/output_file.epub. You can find full documentation here: https://manual.calibre-ebook.com/generated/en/ebook-convert.html

– Denis Stafichuk – 2020-02-29T15:51:25.720

9

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

Molly7244

Posted 2009-09-02T21:57:34.733

Reputation:

Thanks. My criteria were based upon the shortfalls of Calibre. – jamesh – 2009-09-08T11:16:45.330

1ahh, didn't know that ... but when it comes to EPUB, there isn't really much out there except Calibre, even the gurus in an ebook forum where i'm a member don't have other solutions for this format. :( – None – 2009-09-08T11:46:00.857

I'd point your gurus here! Would love to hear what they have to say (I posted an answer, btw). – jamesh – 2009-09-08T12:45:08.083

2

There are online tools to convert to epub files.

Example of such a website here.

caliban

Posted 2009-09-02T21:57:34.733

Reputation: 18 979

1

This one supports more sensible input formats, and is quicker: http://www.2epub.com

– MGOwen – 2010-07-08T06:04:38.077

Thanks. This worked, although I did need to do some curation on the file. Not yet suitable for batch importing. – jamesh – 2009-09-08T12:46:04.743

1

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

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

It relies on Automator

user46377

Posted 2009-09-02T21:57:34.733

Reputation: 11

1

You may want to try ODFToEPub. This is an OpenOffice extension that lets you export a document to ePub.

http://www.pincette.biz/odftoepub/

Werner Donné

Posted 2009-09-02T21:57:34.733

Reputation: 11

0

If you have access to a Windows system, you can try Atlantis Word Processor. It converts not only TXT but also DOC, DOCX, and ODT files to EPUB. Only a few mouse clicks are needed to convert a document to EPUB. Convenient batch conversion is also offered. You can find details here:

http://www.atlantiswordprocessor.com/en/help/index.php?page=html/ebook.htm

Or see the main page of its site (there is also a download link).

user35568

Posted 2009-09-02T21:57:34.733

Reputation:

0

Best way to convert to epub is with Calibre, it's free and really easy to do. I just had to do this with a bunch of documents for our sales team to take into the field with the iPad. Here's the guide I used:

http://osxdaily.com/2010/08/12/convert-to-epub/

Free download, quick conversions, doesn't get much better.

Josh B

Posted 2009-09-02T21:57:34.733

Reputation: 111

-1

A bit off-topic:

Here's a nice website, titled EVERYTHING ABOUT READING ELECTRONIC BOOKS.

Well, not quite EVERYTHING, but very informative nevertheless :)

This being a Russian website, they're focused on some of these extraordinary Russian eBook reading programs such as ICE Book Reader Professional, CoolReader 2 (maybe not as sophisticated as ICE but free) and AlReader 2. None of these support the EPUB format though.

There's also a link to several ePub libraries, which might be of interest for you.

Molly7244

Posted 2009-09-02T21:57:34.733

Reputation: