How can I use the command line to change the color of an object without displaying the GUI. -z option does not work.

Asked by Lajide O on 2017-08-31

Using the inkscape command line "inkscape --select=MyStar --verb =ObjectRotate90 --verb=FileSave --verb=FileClose MyStar.svg"
works but it activates the GUI which I don't want.
I tried using the -z option to suppress the GUI and as described in the manual, inkscape does not support --verb=without-gui.
I'd like to use the replace color command described in the extension or any online command to change the color of an object without activating the GUI and at the same time saving the change.
Please help.
Thanks. Lajide

Question information

English Edit question
Inkscape Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Best Hachmann (marenhachmann) said : #1

Currently, this is not possible. Anything that opens a dialog needs a GUI (and then needs user input).

Xverbs (see is meant to overcome this limitation for the 'Save as...' dialog. It's not available for the color change dialog, though.

You can, however, use any xml library (or even any automatable text tool, like sed or awk) to automate editing of SVG files, especially if all you want is to replace a color.

Lajide O (dopamine) said : #2

Thanks Hachmann. This answers my question. I was already using Xquery to extract the object and change the color within the svg file, but I thought I'll ask just in case. Thanks. Problem solved.