Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
generate epub, mobi, pdf, and html books from markdown using javascript
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
kindlegen-mac
.gitignore
LICENSE
README.md
index.js
kindlegen.js
package.json
pandoc.js
test.js

README.md

ebook

generate epub, mobi, pdf, and html books from markdown using javascript

ebook uses pandoc and kindlegen to create epub, mobi, pdf, and html files from markdown.

WARNING:

This is a very bare-bones proof of concept super-quick demo. It might not work for you.

So far it only works on Mac 10.5 plus, because it only bundles the Mac version of kindlegen right now.

Right now the mobi file builds with warnings. The output isn't clear what the warnings are.

Usage:

In your code:

var ebook = require('ebook');

ebook({
  source: 'some-markdown-file.md',
  folder: 'the-folder-you-want-the-files-to-be-put-in'
});

With the command line:

npm install -g ebook
ebook --source some-markdown-file.md --folder the-folder-you-want-the-files-to-be-put-in

Roadmap:

  • move kindlegen.js and pandoc.js into their own repos, and make them more useful on their own.
  • clean up the code and allow the inclusion of additional options.
  • make it possible to create ebooks from multiple files, set a cover image, and allow custom styles.

License

MIT

Something went wrong with that request. Please try again.