un multi inscape commands in one line

Post questions on how to use or achieve an effect in Inkscape.
gloris22
Posts: 1
Joined: Fri Jul 29, 2011 7:00 pm

un multi inscape commands in one line

Postby gloris22 » Fri Jul 29, 2011 7:01 pm

Hi,
is possible run multi inscape commands in one line?


I need grab some images from svg and this variant is to slow:

Code: Select all

exec(inkscape file.svg --export-id=g123 --export-png=img1.png);
exec(inkscape file.svg --export-id=g124 --export-png=img2.png);
exec(inkscape file.svg --export-id=g125 --export-png=img3.png);


exec() - is vero slow.

So i need do everything in one line.
I try this:
exec(inkscape file.svg --export-id=g125 --export-png=img3.png inkscape file.svg --export-id=g123 --export-png=img1.png);
But extract only last image.

drasill
Posts: 3
Joined: Sat Jul 30, 2011 5:13 am

Re: un multi inscape commands in one line

Postby drasill » Sat Jul 30, 2011 5:31 am

Hi !

I suppose it is possible with the "shell" mode :

http://wiki.inkscape.org/wiki/index.php ... Shell_mode

I didn't test it, but something like this could work :

echo "file.svg --export-id=g123 --export-png=img1.png\nfile.svg --export-id=g124 --export-png=img2.png" | inkscape --shell


Return to “Help with using Inkscape”