Seth Kenlon

作者评论

你假设我使用“beg”这个词很古老!加入我的现代语法学家团队,你也可以滥用无数古代短语。

是的,我同意Jason的观点。 Pandoc使HTML转换为epub非常简单。

如果所有HTML都在一个文件中,那就最简单了,但并非总是如此,因此您可能必须将pandoc指向每个文件...

假设是Linux shell

$ pandoc -f html -t epub3 index.html preface.html chapeter1.html chapter2.html -N --epub-stylesheet=stylesheet.css --epub-metadata=metadata.xml --epub-cover-image=cover.jpg --epub-embed-font=liberation.ttf --epub-embed-font=Nouveau_IBM.ttf -o mybook.epub

样式表是可选的,元数据文件是您需要手动生成的文件。它不必复杂

$ cat metadata.xml
Foo和Bar之书
Seth Kenlon

结果将是一个epub,在任何电子书管理软件中都显示为“Seth Kenlon”的“Foo和Bar之书”,并在您的文件系统中显示为“mybook.epub”。

我经常使用这种命令;我从网络上提取一个目录并将页面转换为电子书,以便我可以离线阅读。我正在以这种方式阅读GNU Gawk手册。
希望对您有所帮助。

© . All rights reserved.