简体   繁体   English

在Mac上的Python中从命令行从rtf转换为docx

[英]conversion from rtf to docx from the commandline on a Mac in Python

Does anyone know of a Python script to convert rtf to docx on a Mac? 有谁知道在Mac上将rtf转换为docx的Python脚本吗?

Textutil does not properly process headers and footers, so that is not an option. Textutil无法正确处理页眉和页脚,因此这不是一种选择。 I need a commandline utility because I have a large number of files in different locations to process. 我需要一个命令行实用程序,因为我需要在不同位置处理大量文件。 The textutil interface is fine... it is just mind-boggling that it doesn't handle the header (which contains important information in my documents). textutil接口很好。。。它不能处理标头(在我的文档中包含重要信息),真是令人难以置信。

A Python script is preferable. 最好使用Python脚本。

-Joe -Joe

I don't know the exact answer to your question, but can suggest another way of doing it: Since you are doing this on OSX, why not use the built-in automator? 我不知道您问题的确切答案,但是可以提出另一种解决方法:既然您是在OSX上执行此操作的,为什么不使用内置的自动器呢? For an example, look at http://aseriesoftubes.com/articles/how-to-batch-convert-doc-files-to-pdf-format-using-mac-osx-automator/ or https://discussions.apple.com/thread/3050596?tstart=0 例如,请访问http://aseriesoftubes.com/articles/how-to-batch-convert-doc-files-to-pdf-format-using-mac-osx-automator/https://discussions.apple的.com /螺纹/ 3050596?TSTART = 0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM