Org mode epub export
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 80 commits behind ofosos:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
COPYING
README.org
org-epub.el

README.org

org-epub

Generate .epub files directly from OrgMode. This will export EPUB version 2, which should give broad compatibility. It should also be relatiely easy to convert the resulting .epub to a .mobi (Kindle).

Prerequisites

This depends on Emacs 25 and OrgMode 9, it won’t work on OrgMode 8 or any version of Emacs before 25.

Usage

Use org-epub like this:

(setq org-publish-project-alist
      '(

	("reader-B-html"
	 :base-directory "~/bjcp-reader-1/"
	 :base-extension "org"
	 :publishing-directory "~/bjcp-epub/readerZ/"
	 :recursive t
	 :publishing-function org-epub-publish-to-epub
	 :headline-levels 4
	 :auto-preamble t
	 :preparation-function org-epub-publish-finish
         ;; epub specific - these *MUST* be set
	 :epub-file "bjcp.epub"
	 :epub-cover "bjcp.jpg"
	 :epub-cover-width 800
	 :epub-cover-height 600
	 :author "Beer Judge Certification Program"
	 :publisher "Mark Meyer"
	 :rights "t.b.d."
	 :toc-depth 2
	 :uid "http://ofosos.org/bjcp/jpm.epub"
	 :title "Beer Judge Prep - Reader 1"
	 :language "en"
	 :subject "non-fiction beer"
	 :description "Beer Judging Prep Class, Reader for Session One"
	 :epub-date "2017-01-01")

	 ("reader-1-static"
	  :base-directory "~/bjcp-reader-1/"
	  :base-extension "jpg"
	  :publishing-directory "~/bjcp-epub/readerZ/"
	  :recursive t
	  :publishing-function org-publish-attachment)

	 ("reader-1" :components ("reader-B-html" "reader-1-static"))))

Then M-x org-publish RET bjcp RET. Should work reasonably.

After that you’ll have an output directory with all the important files. The final EPUB file will be the file you specified as :epub-file ....

Features

Currently org-epub can do the following:

  • simple cover images
  • direct .epub generation

Caveats

These will eventually be fixed:

  • Stylesheets not implemented.
  • Can’t have space or anything special in your filenames.
  • Part headings are not included
  • Headline levels are borken
  • The assumption that your org-mode files end in `.org’ is hardcoded everywhere.