Something like epub-tools, for example? But that's mostly about writingepub format (from various possible sources), as is epubtools (similar spelling, different project). For reading it, I'd try the companion project threepress, a Django app for showing epub books on a browser -- haven't looked at that code, but I imagine that in order to show the book it must surely first be able to read it;-).
I wound up here after looking for something similar and was inspired by Mr. Bothwell's code snippet to start my own project. If anyone is interested ... http://epubzilla.odeegan.com/
发布评论
评论(4)
.epub 文件是一个包含 META-INF 目录的 zip 编码文件,该目录包含一个名为 container.xml 的文件,该文件指向另一个通常名为 Content.opf 的文件,该文件对构成电子书的所有其他文件进行索引(摘要基于 http://www.jedisaber.com/eBooks/tutorial.asp ; 完整规范位于 http://www.idpf.org/2007/ opf/opf2.0/download/ )
以下 Python 代码将从 .epub 文件中提取基本元信息并将其作为字典返回。
示例输出:
An .epub file is a zip-encoded file containing a META-INF directory, which contains a file named container.xml, which points to another file usually named Content.opf, which indexes all the other files which make up the e-book (summary based on http://www.jedisaber.com/eBooks/tutorial.asp ; full spec at http://www.idpf.org/2007/opf/opf2.0/download/ )
The following Python code will extract the basic meta-information from an .epub file and return it as a dict.
Sample output:
例如,类似于 epub-tools 的东西?但这主要是关于编写
epub
格式(来自各种可能的来源),epubtools (类似拼写,不同项目)。为了阅读它,我会尝试配套项目 Threepress ,一个用于在浏览器上显示 epub 书籍的 Django 应用程序 - 还没有看过该代码,但我想为了显示这本书,它必须首先能够阅读它;-)。Something like epub-tools, for example? But that's mostly about writing
epub
format (from various possible sources), as is epubtools (similar spelling, different project). For reading it, I'd try the companion project threepress, a Django app for showing epub books on a browser -- haven't looked at that code, but I imagine that in order to show the book it must surely first be able to read it;-).查看 epub 模块。这看起来是一个简单的选择。
Check out the epub module. It looks like an easy option.
在寻找类似的东西后,我来到这里,并受到 Bothwell 先生的代码片段的启发,开始了我自己的项目。如果有人感兴趣... http://epubzilla.odeegan.com/
I wound up here after looking for something similar and was inspired by Mr. Bothwell's code snippet to start my own project. If anyone is interested ... http://epubzilla.odeegan.com/