Inkscape Community

Help Using Inkscape => Beyond the Basics => Topic started by: PlasmaBinturong on December 14, 2016, 05:53:35 AM

Title: Use verbs without graphical interface
Post by: PlasmaBinturong on December 14, 2016, 05:53:35 AM
Hello Inkscape Community,

I am using inkscape on Ubuntu 12.04 at work, and I feel the need for more command-line functionalities. Here is my problem:

I want to execute verbs without graphical interface running (isn't it a waste of resources and time?), but apparently it is not possible...
My concrete example is this:

Code: [Select]
inkscape -z --verb EditSelectAll --verb ObjectFlowtextToText --verb FileSave myfile.svg
# or even, saving in another filename with -l (implies -z) would be cool:
inkscape --verb EditSelectAll --verb ObjectFlowtextToText -l myeditedfile.svg myfile.svg

It does not work (does not complain and create the file if needed, but no verb is executed). Instead, this works (with the gui):

Code: [Select]
inkscape --verb EditSelectAll --verb ObjectFlowtextToText --verb FileSave --verb FileQuit myfile.svg 

This is not so bad, but why does Inkscape require to run the gui to perform verb actions? Is it the way verbs are built, or could it be avoided? Or at least, they should be a warning like "--verb are ignored when using -z" for users like me who thought it would be straightforward to automatise their workflow ;) 

Thanks a lot!
Title: Re: Use verbs without graphical interface
Post by: PlasmaBinturong on December 14, 2016, 06:59:43 AM
Hm I actually think more automation like this is not going to be possible any time soon. I just read this discussion where someone proposes to implement some extension allowing it: http://inkscape.13.x6.nabble.com/Automating-an-Inkscape-workflow-td4967201.html (http://inkscape.13.x6.nabble.com/Automating-an-Inkscape-workflow-td4967201.html)
Title: Re: Use verbs without graphical interface
Post by: Moini on December 14, 2016, 05:48:22 PM
Please see here, also: https://bugs.launchpad.net/inkscape/+bug/843260
Title: Re: Use verbs without graphical interface
Post by: brynn on December 15, 2016, 06:32:30 PM
 :w1:  Welcome to the forum!

This doesn't answer your question, but just fyi

https://inkscape.org/en/doc/inkscape-man.html
Title: Re: Use verbs without graphical interface
Post by: PlasmaBinturong on December 21, 2016, 02:21:54 AM
Please see here, also: https://bugs.launchpad.net/inkscape/+bug/843260

Thank you @Moini, I'm happy to see a bug report has already been filed about this issue and that the discussion exists, and I hope someday this is gonna be implemented. Not sure when though... At least one cool thing in current versions of inkscape (not mine at work unfortunately), there is a warning when using '-z' with some verbs!

Thanks for the link @brynn, I read many times the man page ^^, but yeah I probably still missed a few things and maybe the up-to-date version would be more helpful!