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!
Shell Scripting - Linux
Re: Shell Scripting - Linux
It's not possible to pass any parameters to extensions via the command line as of Inkscape 0.91.
If you do , 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.
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
If you do
Code: Select all
inkscape --verb-list | grep gcode
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)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)