且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否有用于将 RTF 转换为纯文本的 Python 模块?

更新时间:2023-01-25 16:28:25

OpenOffice 有一个 RTF 阅读器.您可以使用 python 编写 OpenOffice 脚本,查看此处了解更多信息.

OpenOffice has a RTF reader. You can use python to script OpenOffice, see here for more info.

您可能可以尝试在 Windows 上使用魔法 com-object 来读取任何带有 ms-binary 气味的东西.不过我不建议这样做.

You could probably try using the magic com-object on Windows to read anything that smells ms-binary. I wouldn't recommend that though.

其实解析原始数据可能不会很难,看这个例子 用 .bat/QBasic 编写.

Actually parsing the raw data probably won't be very hard, see this example written in .bat/QBasic.

DocFrac 是 RTF、HTML 和文本之间的免费开源转换器.可以使用 Windows、Linux、ActiveX 和 DLL 平台.用 python 包装它可能很容易.

DocFrac is a free open source converter betweeen RTF, HTML and text. Windows, Linux, ActiveX and DLL platforms available. It will probably be pretty easy to wrap it up in python.

RTF::TEXT::Converter - 用于将 RTF 转换为文本的 Perl 扩展.(以防您在使用 DocFrac 时遇到问题).

RTF::TEXT::Converter - Perl extension for converting RTF into text. (in case You have problems withg DocFrac).

官方富文本格式 (RTF) 规范,版本 1.7,由 Microsoft 提供.

Official Rich Text Format (RTF) Specifications, version 1.7, by Microsoft.

祝你好运(在你的工作环境中拥有有限的特权).

Good luck (with the limited privileges in Your working environment).