wrapper around calibre's ebook-convert command
JavaScript
Switch branches/tags
Nothing to show
Latest commit efc6fb3 Jan 30, 2017 @sethvincent 2.0.1
Permalink
Failed to load latest commit information.
examples rewrite Jan 30, 2017
.gitignore rewrite Jan 30, 2017
LICENSE.md rewrite Jan 30, 2017
README.md typo fix Jan 30, 2017
index.js rewrite Jan 30, 2017
package.json 2.0.1 Jan 30, 2017

README.md

ebook-convert

A wrapper around the command-line tool ebook-convert from Calibre

Usage:

var path = require('path')
var xtend = require('xtend')
var convert = require('ebook-convert')

// see more options at https://manual.calibre-ebook.com/generated/en/ebook-convert.html
var options = {
  input: path.join(__dirname, 'example.html'),
  output: path.join(__dirname, 'example.epub'),
  authors: '"Seth Vincent"',
  pageBreaksBefore: '//h:h1',
  chapter: '//h:h1',
  insertBlankLine: true,
  insertBlankLineSize: '1',
  lineHeight: '12',
  marginTop: '50',
  marginRight: '50',
  marginBottom: '50',
  marginLeft: '50'
}

/*
* create epub file
*/
convert(options, function (err) {
  if (err) console.log(err)
})

Installation:

Install calibre

Install ebook-convert with npm:

npm install ebook-convert

License

ISC