I would like to edit SVG files using some scripting language (preferably Python). In particular, I would like to merge two SVG files, add some annotations, and arrange them in a larger image. Is there any software available for such purposes?
Thanks,
Bartosz
I finally decided to use the approach proposed by nosklo. You can find the code of SVG handling python module on github repo. I also described how to use it in this post
You could use something like lxml - after all SVG files are XML. It's available from PyPI pip: https://pypi.python.org/pypi/lxml/
I don't know if you could do what you describe, but Inkscape supports some degree of scripting with Python.
Very late answer, but in case it helps anyone, I have written a very small extension for Inkscape that allows writing short python code snippets from within Inkscape.
You can type up to 5 lines and iterate over objects in the current selection or in an XPath. Includes some code examples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With