Comment 11 for bug 602005

Revision history for this message
su_v (suv-lp) wrote :

Jon A. Cruz wrote
> The prior comment was not correct. By design the current inkscape
> extension system uses scripts that take SVG in on stdin and put
> replacement output SVG to stdout. These were intended to be
> reusable as stand-alone CGI-like components that are simple
> to reuse in other contexts, including invocations from other
> programs or scripts.

There are different kind of script files included in the extensions directory, and not _all_ of them are intended to be used as stand-alone components. In my understanding this is limited to those scripts, which are referenced as <command/> in the corresponding INX file.

NOTE: If a shebang line is added e.g. to javascript files which are intended for embedded use in SVG files, it can break an extension (as happens with JessyInk.js [1]).

IMHO there should be rules defined, e.g.
With shebang:
- scripts which are called by INX files (as <command …></command>)
No shebang:
- (python/perl) scripts only imported as modules
- (java)script files to be embedded in SVG files

The merged changes to trunk
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/9734>
does not include all changes from the merge proposal
<http://bazaar.launchpad.net/~lajjr/inkscape/shebangs/revision/9637>
but apparently on some distributions (reported for 0.48.1 on Debian), Inkscape is shipped with the changes from the branch instead of the committed changes (causing locally created JessyInk presentations to fail in web broswers).

[1] reported on irc, with Inkscape 0.48.1 distributed by Debian: new presentations don't run e.g. in Firefox, with this error:

Error: illegal character
Source File: http://imgh.us/187_test.svg
Line: 98
Source Code:
#!/usr/bin/env js