Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Use Pandoc and Calibre to compile Markdown text to Epub, with source included in the Epub.
Python Shell
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
sample/Alice in Wonderland

Markdown Epub Builder

mdepub is a tool which allows you to compose a book in Markdown format and use Pandoc and Calibre to compile an Epub package including all of the book's source material. In effect you can keep the source and product in the same file in your library; if you ever want to revise the product, you merely need to extract the source, make edits, and recompile.

This program is a work in progress. It's not fully functional yet!


  • Beautiful Soup -- HTML/XML stream parsing and manipulation for Python
  • Calibre (Calibre's ebook-convert command is used to manipulate and build EPUB package files.)
  • pandoc -- all purpose converter to and from Markdown syntax
  • Python 2.7
  • YAML for Python -- minimal config / serialization syntax

Install Calibre on a Unix box:

sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('').read()); main()"

Ubuntu packages for the rest of the requirements:

sudo apt-get install pandoc python-beautifulsoup python-yaml
Something went wrong with that request. Please try again.