Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm using Windows and really bad when it comes to using the python COM scripting to control other programs/processes. But it would be awesome if I could have a python script that converts my inkscape .svg files to .ai files*.

What I'm doing now is saving a copy from inkscape to .pdf and then opening that .pdf in Illustrator. From Illustrator I save the file as .ai. This is the task I wish to automate via COM or other options..

Any help in the right direction would be appreciated.

*.pdf to .ai would also work, but not as optimal if I have to manually save them as .pdf


Bonus info:

I love working with inkscape (great open source vector drawing program) and wish to continue using it. However the laser cutter I'm playing with will only eat .ai files and inkscape failes to export the other formats that it eats. Right now I have to save a copy of my .svg files to .pdf and then in Illustrator save them as .ai files.

like image 798
Norfeldt Avatar asked Sep 29 '22 03:09

Norfeldt


1 Answers

try to create a loop with the module SendKeys:

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

download and guide here

like image 156
Liam Avatar answered Oct 07 '22 19:10

Liam