0.1.3 • Published 10 years ago

epubstream v0.1.3

Weekly downloads
36
License
-
Repository
github
Last release
10 years ago

epubstream

DESCRIPTION

Epubstream is a module for generating epub2 files directly to a writable stream.

USAGE

var epubstream = require('epubstream'),
    fs = require('fs');

// Create epub and provide the minimum possible metadata
var epub = epubstream.createEpub({
    title: 'Sample',
    nav: [{ label: 'foo', content: 'foo.html' }]
});

// Start piping the epub to a file
epub.pipe(fs.createWriteStream('sample.epub'));

// Add the file foo.xhtml to the archive
epub.addFile(fs.createReadStream('foo.xhtml'), 'foo.xhtml', function() {
    // Write the XML files required for epub (ncx/opf/ocf)
    epub.finalize(function(b) { console.log('%d bytes', b); });
});

LIMITATIONS

Files added to an epub are passed through unmodified, so you must ensure that your XHTML files comply with the Epub2 specification.

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.4

11 years ago

0.0.5

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago