从linux命令行创建word doc文件
我有一些 HTML 文件需要以 MS Word 文档格式分发(不要问!)。我可以在 OpenOffice 中手动打开每个文件,然后另存为 doc 文件。但我有很多文件,所以我想自动执行此操作。你知道一个方法吗?
I have some HTML files that I need to distribute in MS Word doc format (don't ask!). I can manually open each in OpenOffice and then save as a doc file. But I have quite a few files so I want to automate this. Do you know a way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尚未测试,但有 pyuno 包来访问 OpenOffice API 和下面的程序展示了一些这样做的方法。
ooextract.py
Havn't tested but there is pyuno package to access OpenOffice API and following program show some ways to do like that.
ooextract.py
Abiword 可以从命令行转换文件。
我个人还没有尝试过将 HTML 转换为 DOC,但由于它支持这两种格式,因此似乎值得一试。
另外,RTF 是否足够好? 许多 HTML->RTF 转换器。
Abiword can convert files from the command line.
I haven't personally tried it to convert HTML to DOC, but since it supports both those formats, it seems like it's worth a try.
Also, would RTF be good enough? There are lots of converters for HTML->RTF.