How can I change the color of an object from the command line?

Asked by Jide Odubiyi on 2018-02-01

I'd like to change the color of an object from the command line. To rotate an object in a file, I can use the following command:

inkscape -f star92.svg --select=objectID --verb ObjectRotate90CCW --verb FileSave
 to rotate the object counterclockwise.
Is there a verb such as ObjectColorChange or something similar to change the color of an object from the command line?
Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Hachmann
Solved:
2018-02-01
Last query:
2018-02-01
Last reply:
2018-02-01
Best Hachmann (marenhachmann) said : #1

No, that's not possible currently. You would need to either:

- edit the SVG as a text file (with sed, awk, ...)
- edit the SVG as an XML document (with any XML library that you prefer)
- edit the SVG programatically with Inkscape by using an extension that reads the desired color data from... somewhere. CSV, database, random, following a specific conversion rule,...

Jide Odubiyi (lajide) said : #2

Thanks Hachmann. Your suggestions should work and I will explore them.
Best regards. Jide