This repository has been archived on 2019-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
epub/index.js
2011-06-12 22:04:40 +03:00

27 lines
600 B
JavaScript

var EPub = require("./epub");
var epub = new EPub("img.epub", "tere", "vana");
epub.on("error", function(err){
console.log("ERROR\n-----");
throw err;
});
epub.on("end", function(err){
console.log("PARSED\n-----");
console.log(epub.metadata);
console.log(epub.manifest);
console.log(epub.spine);
console.log(epub.toc);
epub.getChapter("item259", function(err, data){
console.log(err || data);
});
epub.getImage("item262", function(err, data, mimeType){
console.log(err || data);
console.log(mimeType)
});
});
epub.parse();