可以用 epub库,下面是大概用法 var EPub = require("epub"); var epub = new EPub("./test.epub"); epub.on("end", function() { epub.flow.forEach(function(chapter) { console.log("目录:", chapter.id); epub.getChapter(chapter.id, function(error, text) { // 在这里把每一章的文本存到 txt 文件里面 console.log(error); console.log(text); }); }); }); epub.parse();
可以用 epub库,下面是大概用法