Inkscape.org
Embroidery and InkStitch Passing arguments in Inkscape CLI actions - org.inkstitch.stitch-plan-preview.
  1. #1
    Riki Maru Riki Maru @pperekoty
    *

    Hello!
    I am trying to use the org.inkstitch.stitch-plan-preview extension from Ink/Stitch via the Inkscape CLI and pass specific parameters to the action. Currently, I am unable to figure out how to include these arguments directly in the --actions parameter of the Inkscape CLI.

    When running the following command:

    ./inkscape --actions="org.inkstitch.stitch-plan-preview:{ args need here };" --export-type=svg --export-filename=output.svg input.svg

    I expect to provide arguments such as --render-mode, --move-to-side, and --layer-visibility, similar to how they are specified when using the standalone Ink/Stitch CLI:

    ./inkstitch --extension=stitch_plan_preview --render-mode=realistic-600 --move-to-side=False --layer-visibility=hidden input.svg > output.svg

     

  2. #2
    inklinea inklinea @inklinea⛰️

     As far as I am aware, it is not possible to pass parameters to extensions using the command line.

    The extension will use the default parameters, or the last know parameters which will have been saved when Inkscape GUI was last cleanly exited.

  3. #3
    Riki Maru Riki Maru @pperekoty

    Is it possible to change these default parameters without GUI, for example through some config file?

  4. #4
    inklinea inklinea @inklinea⛰️

    In the case of a non Inkstitch extension, the parameters are usually stored in preferences.xml in the user config folder.

    In the case of Inkstitch I'm not sure. I suspect there may be another location in which the parameters are saved.

    In the first case, I have hacktastically changed parameters on the fly using a script in the past, but it's far from ideal.

    I'm not familiar with the inkstitch command line options. It may be simpler to write a python (or other language script) to run the inkstitch cli and then open ( or pipe ) the resulting file into the Inkscape command line ? or vice-versa 

  5. #5
    Riki Maru Riki Maru @pperekoty

    Okay, thx.

Inkscape Inkscape.org Inkscape Forum Embroidery and InkStitch Passing arguments in Inkscape CLI actions - org.inkstitch.stitch-plan-preview.