是否存在用于处理 PRC/.mobi 文件的 PHP 库? [英] Does a PHP library exist to work with PRC/.mobi files?

查看:16
本文介绍了是否存在用于处理 PRC/.mobi 文件的 PHP 库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个 WordPress 插件来创建电子书来自大多数主要电子书格式的选定类别.我想支持 MobiPocket,因为这是 Kindle 使用的格式,但我不知道如何去做.从我读过的内容来看,.mobi 文件实际上是 Palm 资源数据库 (PRC),但我一直无法找到一个 PHP 类来处理这些.

I'm writing a WordPress plugin to create an eBook from a selected category in most major eBook formats. I would like to support MobiPocket since that's the format used by the Kindle but I'm not sure how to go about it. From what I've read .mobi files are actually Palm Resource Databases (PRC) but I haven't been able to find a PHP class to work with these.

我考虑过将 exec 与 KindleGen 一起使用,但这是不可取的,因为它会使初始设置复杂化.我还考虑过在某处托管 Web 服务并使用 XML-RPC 来实现这一点,但这也使事情变得复杂.

I thought about using exec along with KindleGen but that would be undesirable as it would complicate initial setup. I've also thought about hosting a web service somewhere and using XML-RPC to accomplish this but that also complicates things.

我的问题是:是否有一个 PHP 类/库(仅限 PHP)可以与 PRC 一起使用,甚至更好,一个专门用于创建 MobiPocket 电子书的类?(需要开源,因为我是在 GPL 下发布的)

My question is: is there a PHP class/library (PHP-only preferred) that can work with PRC or even better, a class that specialises in creating MobiPocket ebooks? (needs to be open source since I'm releasing under the GPL)

我尝试过搜索,但没有找到任何东西.

I've tried searching but haven't been able to find anything.

推荐答案

我不知道你是否还在寻找这个 PHP 库,以防万一:https://github.com/raiju/phpMobi.这是一个从 html 文件创建 mobi 文件的库.

I don't know whether you're still looking for this PHP library, but just in case: https://github.com/raiju/phpMobi. This is a library that creates mobi files from html files.

它仍然应该被视为一个实验版本,但对于包含一些图像的基本文档,它应该可以正常工作.

It's should still be seen as an experimental version, but it should work without a problem for basic document with a few images.

这篇关于是否存在用于处理 PRC/.mobi 文件的 PHP 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆