We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
简短的回答是肯定的,它可以用任何编程语言来完成。
基本步骤:
一些可以帮助您入门的网站:
2015 年 6 月注意: epubcheck 验证器已移动从谷歌代码到 GitHub;记下新的 URL。
The short answer is yes, it can be done in any programming language.
Basic steps:
Some web sites to help you get started:
June 2015 Note: The epubcheck validator has moved from google code to GitHub; note the new URL.
Calibre 支持多种输入格式(包括 HTML)和多种输出格式(包括 EPUB) ,但它不是“一种编程语言或库”。您想要基于编程的方法而不是独立工具是否有具体原因?如果是这样,也许是 Python 和 ebookmaker。例如,py 可以帮助您。
Calibre supports a wide variety of input formats, including HTML, and a wide variety of output formats, including EPUB, but it's not "a programming language or library". Are there specific reasons you desire a programming-based approach rather than a free-standing tool? If so, maybe Python and ebookmaker.py, for example, could help you.
回复晚了,但我发现基于 Python 3 的 ebookmaker 很有价值,至少在我之后贡献了一个删除 UTF-8 BOM 的拉取请求。它的一个问题似乎是它使用 解析 HTML 的脆弱正则表达式,但我想我必须在那里报告它。
A late reply, but I found the Python 3-based ebookmaker to be of value, at least after I contributed a pull request to remove a UTF-8 BOM. One problem with it appears to be that it uses brittle regular expressions to parse HTML, but I guess I'll have to report it there.
这是pdf to epub,我知道这不是你想要的,但是这是一个开始。
calibre 包可能有你想要的
Here's pdf to epub, I know that's not what you're after, but it's a start.
The calibre package may have what you want
我正在使用 Aspose 的以下库 - http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx
只需两行代码,我就可以进行 html 到 epub 的转换。当前在生产系统中使用它。
文档 doc = new Document(_sourceFilePath);
doc.Save(_destinationFilePath, SaveFormat.Epub);
I am using the following library from Aspose - http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx
In just two lines of code I am able to do html to epub conversions. Using this currently in a production system.
Document doc = new Document(_sourceFilePath);
doc.Save(_destinationFilePath, SaveFormat.Epub);
我刚刚开始用Java(兼容OpenJDK)实现这样一个工具:html2epub。为了摆脱手动编辑配置文件的麻烦,我可能会启动一个单独的工具来从任何给定目录生成配置文件(但是,仍然需要确定 EPUB 中 XHTML 的顺序 - 对于非-编程使用,可以考虑开发一个GUI帮助工具,对于完全灵活的编程解决方案,我还没有想出一个想法)。在此之前,我为自定义 XML 输入实现了基于 shell 脚本的转换器(hag2epub 工具 ) - 如果您感兴趣,我可能会将它们移植到 XHTML 输入(使用 EPUB 元数据的配置文件或从目录最顶层的 index.html 获取元数据(如果存在))。
I just started to implement such a tool in Java (OpenJDK compatible): html2epub. In order to get rid of manually editing the config file, I'll probably start a separate tool to generate the config file from any given directory (however, it would still be necessary to determine the order of the XHTMLs in the EPUB - for non-programmatical use, developing a GUI helper tool could be considered, for a fully flexible programmatical solution, I haven't come up with an idea yet). Before that, I implemented shell script based converters for custom XML input (hag2epub tools) - in case you're interested, I would probably port them to XHTML input (with a config file for the EPUB metadata or obtaining metadata from the topmost index.html of a directory, if existing).
我之前也遇到过同样的问题,因为我想在 iPad 上离线阅读一些网页内容。我不知道,我也不懂电脑。有 calibre 或 stanza blabla...
但对我来说它们只是格式转换器,我需要一个 ePub 图书创建器,它允许我将许多所需的文档组合在一起阅读。然后我找到了一个书呆子html到ePub转换器,我保存了html页面来自网络,然后用它进行转换。现在对我来说这是一个非常好的工具。
I have the same issue previously, necause I want to read some webpage content offline on my iPad. I have no idea and I am not a computer savvy. There are calibre or stanza blabla....
But for me they are just formats converters and I need a ePub book creator which will allows me to combine many desired documents together to read. Then I found a bookish html to ePub converter, I save the html page from web then convert with it. It's a quite good tool for me now.