Python Inkscape 到 Adob​​e illustrator 任务的自动化(.svg -> .pdf -> .ai)

Python automation of Inkscape to Adobe illustrator task (.svg -> .pdf -> .ai)

我正在使用 Windows 并且在使用 python COM 脚本控制其他 programs/processes 时真的很糟糕。但如果我能有一个 python 脚本将我的 inkscape .svg 文件转换为 .ai 文件*,那就太棒了。

我现在正在做的是将副本从 inkscape 保存为 .pdf,然后在 Illustrator 中打开该 .pdf。在 Illustrator 中,我将文件另存为 .ai。这是我希望通过 COM 或其他选项自动执行的任务..

如能提供正确方向的帮助,我们将不胜感激。

*.pdf 到 .ai 也可以,但如果我必须手动将它们另存为 .pdf 则不是最佳选择


奖金信息:

我喜欢使用 inkscape(出色的开源矢量绘图程序)并希望继续使用它。然而,我正在玩的激光切割机只会吃掉 .ai 文件,而 inkscape 无法导出它吃掉的其他格式。现在我必须将 .svg 文件的副本保存为 .pdf,然后在 Illustrator 中将它们保存为 .ai 文件。

尝试使用模块 SendKeys 创建循环:

import SendKeys
SendKeys.SendKeys(" {PAUSE 2} text {ENTER} {DOWN}" )

download and guide here