Answers.Body: <p>If you are on a Windows platform, the quickest way is to use Abiword.</p>
  
  <p>You can open your text (or .doc or .rtf or .odf) in Abiword. 
  Then File==Save As==.epub. </p>
  
  <p>No intermediate files are necessary. 
  I understand Apple's Pages has the same capability. </p>
  
  <p>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.</p>
  
  <p>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. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-17T01:22:37.783Z
Answers.LastActivityDate: 2014-10-17T01:22:37.783Z
Answers.UserDisplayName: user26732
Answers.Body: <h2>Epub Format</h2>
  <p>Epub is actually a collection of files in ZIP format. You can create an epub without any specialize tool, <a href="https://sites.google.com/site/spontaneousderivation/an-epub-tutorial/creating-the-epub-file" rel="noreferrer">for example</a> taking a book's content from <a href="https://github.com/Gluejar/open_access_ebooks_ebook" rel="noreferrer">https://github.com/Gluejar/open_access_ebooks_ebook</a> and running</p>
  <pre><code>zip -Xr9D The_Velveteen_Rabbit.epub mimetype * -x .DS_Store
  </code></pre>
  <hr />
  <h2>Pandoc</h2>
  <p><a href="http://johnmacfarlane.net/pandoc/" rel="noreferrer">Pandoc</a> 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:</p>
  <pre><code>pandoc mybook.txt -o mybook.epub
  </code></pre>
  <p><a href="http://johnmacfarlane.net/pandoc/epub.html" rel="noreferrer">Read more about epub creation examples</a>.</p>
  <p>I have used it to conveniently generate epub from a Git repositories' documentation to easier reading.</p>
  <h2>Sigil</h2>
  <p>A GUI alternative is <a href="https://code.google.com/p/sigil/" rel="noreferrer">Sigil</a>, with the benefit of in-place editors as well as extensive styling tools.</p>
  <hr />
  <h2>Online Epub Generators</h2>
  <p>If you cannot/do not want to install applications, there are online tools that can generate epubs, such as <a href="http://ebook.online-convert.com/convert-to-epub" rel="noreferrer">http://ebook.online-convert.com/convert-to-epub</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-04-30T09:07:11.257Z
Answers.Text: 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.
Answers.UserDisplayName: Emmanuel
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-04-28T18:40:45.900Z
Answers.LastActivityDate: 2014-04-29T14:12:37.370Z
Answers.LastEditDate: 2020-06-18T08:36:04.683Z
Answers.UserDisplayName: hanxue
Body: <p>I have some raw text documents, mainly novels and theater plays that I would like to convert to <code>EPUB</code>. </p>
  
  <p>What is the best way to do that?
  Should I use an intermediate format?<br>
  Can it be automated?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-17T00:17:42.707Z
Comments.Text: If you are using a Mac computer you can follow this simple 1-hour video tutorial I created on how build your own epub from scratch: http://www.skillshare.com/classes/technology/Build-Your-First-Ebook-From-Scratch-on-a-Mac-with-OS-X/434037366
Comments.UserDisplayName: Guille Lopez
Tags: <conversion><file-format><creation>
Title: Converting raw text to Epub
UserDisplayName: Emmanuel
ThreadText: # Converting raw text to Epub
  
  (Asked by: username_0 on 2014-04-28)
  
  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?
  
  **Tags:** conversion, file-format, creation
  
  > **Comments:**
  > **username_1**: If you are using a Mac computer you can follow this simple 1-hour video tutorial I created on how build your own epub from scratch: http://www.skillshare.com/classes/technology/Build-Your-First-Ebook-From-Scratch-on-a-Mac-with-OS-X/434037366  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2014-04-28. Score: 9 | Accepted answer
  
  ## Epub Format
  
  Epub is actually a collection of files in ZIP format. You can create an epub without any specialize tool, [for example](https://sites.google.com/site/spontaneousderivation/an-epub-tutorial/creating-the-epub-file) 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](http://johnmacfarlane.net/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](http://johnmacfarlane.net/pandoc/epub.html).
  
  I have used it to conveniently generate epub from a Git repositories' documentation to easier reading.
  
  ## Sigil
  
  A GUI alternative is [Sigil](https://code.google.com/p/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>
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_2 on 2014-10-17. Score: 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.
  
  
  ---
  
  