Inkscape.org
Beyond the Basics Multiple Verb commands in one line
  1. #1
    Sayse Sayse @Sayse

    So Currently, I'm doing the following in a powershell script:

    inkscape -g $fname --batch-process --select="$sb1,$o1" --verb="SelectionDiff" -o $fname | Out-Null
    inkscape -g $fname --batch-process --select="$sb2,$o2" --verb="SelectionDiff" -o $fname | Out-Null

    But this opens the GUI twice, making it take longer than if I were able to perform all the actions at once.

    But if I try to run it like this:

     

    inkscape -g $fname --batch-process --select="$sb1,$o1" --verb="SelectionDiff" --select="$sb2,$o2" --verb="SelectionDiff" -o $fname | Out-Null

    It only does the second action.

    How do I write the command so it will perform all the actions in one line, or so that it doesn't have to keep opening/closing the gui with each SelectionDiff?

  2. #2
    inklinea inklinea @inklinea⛰️

    I've never used the --verb option.

    Only --action=" " which works with actions and verbs.

    If you are using a variable as a filename, then perhaps switch over to export-filename: and export-do: instead. 

    export-filename, export-do can be repeated many times in the same command line.

  3. #3
    Sayse Sayse @Sayse
    *

    @inklinea can you provide an example of using --action=" " with a verb command that you've been able to get working?  When I've tried in the past, it just didn't do anything.  I'm still having trouble with it.

  4. #4
    inklinea inklinea @inklinea⛰️
    *

    Something like this ? 

    inkscape --batch-process --actions="select-by-element:rect;select-by-element:ellipse;SelectionSymDiff;export-filename:out1.png;export-do;select-clear;select-by-element:path;select-by-element:text;SelectionDiff;export-filename:out2.png;export-do;" action_test.svg

     

    Action Test
  5. #5
    Sayse Sayse @Sayse

    Whoops, I wasn't adding --batch-process before --actions.  Got it to work now.  Thank you for the help!

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Multiple Verb commands in one line