html转换为epub,使用calibre 先用tidy整理下格式。

~$ tidy -m a.html
~$ ebook-convert a.html a.epub --no-default-epub-cover --base-font-size=10 -v --authors=wang

ebook-convert 是属于calibre里的工具。 关于它的参数,help是看不到的,要看这里 <http://calibre- ebook.com/user_manual/cli/ebook-convert-3.html#html-input-to-epub-output> 其它格式转换在这里 http://calibre-ebook.com/user_manual/cli/ebook-convert.html 如果转换失败,需要清理下html代码,去除多余数据,清理格式。