0.3.8 • Published 9 years ago

pe-epub v0.3.8

Weekly downloads
57
License
MIT
Repository
github
Last release
9 years ago

pe-epub

"pee pub" makes epubs better.

Our goal is to make it as easy as possible to output a valid epub. It's used in production over at The People's E-Book

JSON > EPUB

Here's the bare minimum you need to make an epub

{
	"title" : "The Peoples E-Book",
	"cover" : "http://placekitten.com/600/800",
	"pages" : [{
		"title" : "PE-EPUB",
		"body" : "Making ebooks better."
	}]
}

pe-epub assumes your assets (images, video, audio, stylesheets, javascript) are online so it will get them for you. Text assets like pages, css and js can also be passed in as strings

If you'd like to use local assets see the pe-epub-fs module

Install

npm install pe-pub

Usage

var Peepub   = require('pe-epub');
var epubJson = require('your-epub.json'); // see examples/example.json for the specs
var myPeepub = new Peepub(epubJson);

myPeepub.create('/path/to/epub/and/fileName.epub')
	.then(function(filePath){
		console.log(filePath); // the same path to your epub file!
	});

or...

myPeepub.create('/path/to/epub/')
	.then(function(filePath){
		console.log(filePath); // the same path but we made up a file name for u
	});

Testing

npm install -g jasmine-node
jasmine-node spec
0.3.8

9 years ago

0.3.7

10 years ago

0.3.6

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

11 years ago

0.2.3

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.14

11 years ago

0.1.13

11 years ago

0.1.12

11 years ago

0.1.11

11 years ago

0.1.10

11 years ago

0.1.9

11 years ago

0.1.8

11 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago