1.0.3 • Published 9 years ago
epub-comic-gen v1.0.3
epub-comic-gen
Npm package to create comic epub books, without temporary files when using stream for reading and writing
Requirements
- Node 4.0.0+
Installation
npm install --save epub-comic-genUsage
Complete
var Epub = require('epub-comic-gen');
var epub = new Epub(
'node_modules/epub-comic-gen/exemples/Haruko.cbz',
'./',
'Haruko.pub',
'Haruko San No Kareshi',
'Kuratsuka Riko',
'ja-jp',
'rtl'
);
epub.genrate("3.0", function(err, file){
if(err) return throw err;
console.log(file+' file was created!');
})Minimal
var epub2 = new Epub(
'node_modules/epub-comic-gen/exemples/Haruko',
);
epub2.genrate(function(err, file){
if(err) return throw err;
console.log(file+' file was created!');
})Epub(comic, destinationFolder, destinationFile , title, author, language, direction )
Instantiates the object
Required
comicPath to images directory or cbz file
Optional
destinationFolderPath to output directory (default: The same of comic)destinationFileName of destination file (default: The same of comic + ".epub")titleTitle of the Comic (default: the destinationFile without the ".epub")authorAuthor name (default: "Anonymous")languageLanguage of the comic (default: "en-us")directionBase text direction, options "ltr" left-to-right or "rtl" right-to-left (default: "ltr")
genrate(version, endCallback(err, file))
Required
endCallbackCallback executed on end or in case of errorerrThe errorfileThe patch of the file that was created
Optional
versionThe version of EPUB spec, currently only suport "3.0" (default: "3.0")