10

I have some raw text documents, mainly novels and theater plays that I would like to convert to EPUB.

What is the best way to do that? Should I use an intermediate format?
Can it be automated?

1

2 Answers 2

9

Epub Format

Epub is actually a collection of files in ZIP format. You can create an epub without any specialize tool, for example taking a book's content from https://github.com/Gluejar/open_access_ebooks_ebook and running

zip -Xr9D The_Velveteen_Rabbit.epub mimetype * -x .DS_Store

Pandoc

Pandoc is an easy to use command line tool to generate epubs, and a lot more markup formats such as LaTeX, Markdown, HTML5, Word docx and ODT are supported. Here is an example:

pandoc mybook.txt -o mybook.epub

Read more about epub creation examples.

I have used it to conveniently generate epub from a Git repositories' documentation to easier reading.

Sigil

A GUI alternative is Sigil, with the benefit of in-place editors as well as extensive styling tools.


Online Epub Generators

If you cannot/do not want to install applications, there are online tools that can generate epubs, such as http://ebook.online-convert.com/convert-to-epub

1
  • Thank you, Pandoc looks very interesting, it seems easier to adapt the text to a format accepted by pandoc than to generate directly the xhtml code.
    – Emmanuel
    Commented Apr 30, 2014 at 9:07
1

If you are on a Windows platform, the quickest way is to use Abiword.

You can open your text (or .doc or .rtf or .odf) in Abiword. Then File==Save As==.epub.

No intermediate files are necessary. I understand Apple's Pages has the same capability.

Abiword for Mac OS has not been updated in ages and does not have this capability. Other word processors might have this capability as well; you would have to check.

Another option is Scrivener. You can import the file and then compile to epub. This gives you a good deal more control over the formatting. Scrivener is available for Windows, Mac and Linux.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.