Shell Scripting - Linux

Post questions on how to use or achieve an effect in Inkscape.
emiemi
Posts: 1
Joined: Tue Apr 19, 2016 3:42 am

Shell Scripting - Linux

Postby emiemi » Tue Apr 19, 2016 3:54 am

Hello!

I want to make a script in Linux which transforms a picture in gcode. That means I have to controll inkscape from command line. I searched on internet, but I couldn't find any usefull comand for gcode tools. Is there any posibility for doing this in a pretty simple way (because I'm a beginner in bash scripting ... welll... not "very beginner", but, any way, I'm not advanced) ?

Thank you!

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Shell Scripting - Linux

Postby Moini » Tue Apr 19, 2016 5:59 am

It's not possible to pass any parameters to extensions via the command line as of Inkscape 0.91.

If you do

Code: Select all

inkscape --verb-list | grep gcode
, you'll see options that end with .noprefs.

Those can be used via command line, as you do not need to enter any values then into the dialogs.

The noprefs option will use the parameters you last used. Those are saved in the preferences.xml file.
You can use a custom preferences file with Inkscape command line.

Code: Select all

inkscape /tmp/drawing.svg --select=path6921 --verb=ru.cnc-club.filter.gcodetools_ptg.noprefs

works for me (at least until it asks for numpy).

For processing multiple images, use the interactive mode, without gui, too, as it won't need to restart Inkscape for each image. Don't forget to close the files again ;)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”