As soon as we figure out how to add the makefiles, we will have Python and Perl interpreters embedded in Inkscape via c++. I have been working on this recently, with the goal of being able to script Inkscape itself. Thus the need to work in the same address space.
This is not the same as the extensions stuff, since it has a different purpose. But it should be useful for launching scripts without requiring a shell or pipe. We could maybe merge some of the code.
Basically, it is setup like this: Inkscape--->InkscapeScript--->{perl or python}--->InkscapeBinding--->Inkscape
Hopefully we will have this tied in with the automake tree so that we can start defining parts of InkscapeBinding, which will hopefully be a thin scriptable wrapper of all things Inkscape.
Nor it this the same as the Ecma scripting stuff (<script> nodes on the page itself), which has been stalled recently, and which I promise to make some progress on soon.
If someone who is good with the automake stuff can hook up /src/extensions/script with the rest of the automake tree, I would greatly appreciate it. Makefile.tmp shows the calls necessary to coax Perl and Python to reveal their necessary flags.
Bob
Ben Crowell wrote:
Bulia tells me there will soon be an extensions menu. I'm interested in writing some extensions in Perl. My motivation is to scratch my own itch, but some of the stuff I write might be of interest to other users as well. So far I've just been writing Perl scripts to manipulate SVG files, and running them from the command line. Is there an API for extensions yet? The simplest thing would probably be to do it through a shell, and provide a way to hook the command-line options and arguments up to a dialog box in the GUI. There would need to be provisions for internationalization, and for error reporting (including errors resulting from not having the right Perl modules installed).
However, since Inkscape runs on Windows, running it in a shell might not work. Is the Extensions menu envisioned as a Unix-only feature? It seems like it would be quite complicated to implement such a thing on a cross-platform basis. It's easy to write the scripts to be platform-independent, but, e.g., most Windows users aren't going to have Active State Perl installed, and even if you embedded a Perl interpreter in Inkscape, that would only work for Perl, and there would still be the issue of libraries. Even if you told Windows users they were required to install Perl and a certain set of libraries, it would also be complex to try to write the glue between Inkscape and Perl in a platform-independent way. And my experience from writing a cross-platform Perl app is that it's a lot of work in terms of testing and code maintenance, much more than writing a Unix-only app.
SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel