- # Three args: first arg is inkscape command
- InkscapeCmd, InputFile, OutputFile = sys.argv[1:]
+ # Three args: check whether we have --unstable as first arg
+ if sys.argv[1] == "--unstable":
+ unstable = True
+ InputFile, OutputFile = sys.argv[2:]
+ else:
+ InkscapeCmd, InputFile, OutputFile = sys.argv[1:]
+elif args == 5:
+ # Four args: check whether we have --unstable as first arg
+ if sys.argv[1] != "--unstable":
+ # Invalid number of args. Exit with error.
+ sys.exit(1)
+ else:
+ unstable = True
+ InkscapeCmd, InputFile, OutputFile = sys.argv[2:]