Is there any scripting SVG editor?

邮差的信 提交于 2019-12-07 00:37:46

问题


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

UPDATE

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


回答1:


You could use something like lxml - after all SVG files are XML. It's available from PyPI pip: https://pypi.python.org/pypi/lxml/




回答2:


I don't know if you could do what you describe, but Inkscape supports some degree of scripting with Python.




回答3:


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.



来源:https://stackoverflow.com/questions/1881476/is-there-any-scripting-svg-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!