Closed kantas-spike closed 1 year ago
Merged; thanks for the pull request.
I'm not sure I like the name rest_args
so I might rename that.
I ended up going with user_args
to indicate that these are arguments that are meaningful only to the user, not to Simple Inkscape Scripting itself. See c62fa9e22a72d66a3b306a6ff80e46b728911970.
Thank you @spakin for reviewing and merging my pull request. I really appreciate the time and care you took in reviewing my code and providing feedback. I am glad that this change will make it easier for others to use 'Simple Inkscape Scripting' and improve their workflows. Thank you for creating and maintaining such a useful tool, it has helped me a lot.
P.S. I documented your modifications in the Simple Inkscape Scripting wiki under Running → Command-line execution. Please let me know if anything I wrote is incorrect or misleading or if I missed documenting any important features.
Thank you for creating the documentation. I have reviewed it and it is very helpful and informative. I have not found any issues with it. It is clear and easy to understand.
I believe that this documentation will increase the number of authors of tools that wrap simple_inkscape_scripting.py
, as it makes it easier for others to understand and use the tool.
Purpose
This pull request proposes a change to allow for passing extra arguments to the Python code in the 'Simple Inkscape Scripting' command line usage. (See https://github.com/spakin/SimpInkScr/issues/4 for more information.)
Proposed Change
The proposed change is to add a new command line argument, rest_args, which would be exposed as a global variable in the Python code. This would allow users to pass additional arguments to the Python code, such as positional arguments or arguments beginning with "-".
Usage example
Potential issues
This change misidentifies INPUT_FILE as the first element of rest_args when the argument INPUT_FILE is omitted.
Workaround
As a remedy, when using the standard input, make it possible to specify - for the argument INPUT_FILE.
Simple Inkscape Scripting
is incredibly helpful, thank you for creating it!