I have some raw text documents, mainly novels and theater plays that I would like to convert to
What is the best way to do that?
Should I use an intermediate format?
Can it be automated?
Ebooks Stack Exchange is a question and answer site for ebook publishers and readers. It only takes a minute to sign up.Sign up to join this community
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 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
I have used it to conveniently generate epub from a Git repositories' documentation to easier reading.
A GUI alternative is Sigil, with the benefit of in-place editors as well as extensive styling tools.
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
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.