On Mon, 2007-04-16 at 13:52 -0700, Redefined Horizons wrote:
Thank you for answering my question about inkscape's extension system.
No problem. We love questions and interested people.
You wrote: "What is most popular today is to use an external script (ie python) which gets passed the SVG document."
When you say "gets passed the SVG document", do you mean the document currently being manipulated in Inkscape?
So basically if you think of your script as something you'd run on the command line. So if wrote a little program, let's call it myext.py you could call it from the command line with something like this:
$ python myext.py
Inkscape does exactly that, but it saves the current document to a temporary file first. So it does this all behind the scenes:
$ python myext.py /tmp/ink-extER8we.svg
And expects your program to return the modified document to STDOUT. If you're interested in using python Aaron Spike has written a nice convenience library to help with this that is distributed with Inkscape.
Also (to answer your next e-mail) if the user has something selected in the document, that is also passed to the script like this:
$ python myext.py --id=nodeid45 /tmp/ink-extVER82ew.svg
I hope that helps.
--Ted