Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenmiao committed Feb 18, 2024
1 parent 5d02baa commit 7b60995
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rickrack/rickrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def startup():
dp_proj = ""
dp_argv = {}

argv_opts, argv_left = getopt(sys.argv[1:], "hvtr:i:o:w:e:l:p:d:", ["help", "version", "temporary", "reset=", "input=", "output=", "export=", "window=", "sequence=", "lang=", "locale=", "port=", "project=", "dir="])
argv_opts, argv_left = getopt(sys.argv[1:], "hvtr:i:o:w:e:l:p:d:", ["help", "version", "debug", "temporary", "reset=", "input=", "output=", "export=", "window=", "sequence=", "lang=", "locale=", "port=", "project=", "dir="])

for opt_name,opt_value in argv_opts:
if opt_name in ("-h", "--help"):
Expand All @@ -220,6 +220,9 @@ def startup():
elif opt_name in ("-v", "--version"):
dp_argv["version"] = True

elif opt_name in ("--debug", ):
dp_argv["debug"] = True

elif opt_name in ("-t", "--temporary"):
dp_argv["temporary"] = True

Expand Down Expand Up @@ -773,7 +776,7 @@ def run(self, dp_argv={}, dp_proj=""):
The sequence displayed in Rickrack Result window is 2, 1, 0, 3, 4 according to the color set list, i.e., the first color in color list is the middle (main) color in Rickrack Result window.
Args:
dp_argv (dict): rickrack argv, includes "help", "version", "temporary", "reset", "input", "output", "window", "sequence", "lang" and (or) "port". for example, {"help": True, "reset": "all"}.
dp_argv (dict): rickrack argv, includes "help", "version", "debug", "temporary", "reset", "input", "output", "window", "sequence", "lang" and (or) "port". for example, {"help": True, "reset": "all"}.
dp_proj (str): rickrack startup argv, project directory.
"""

Expand Down Expand Up @@ -838,7 +841,7 @@ def run(self, dp_argv={}, dp_proj=""):
run_argv = ""

for dp_key in sdp_argv:
if dp_key in ("help", "version", "temporary"):
if dp_key in ("help", "version", "temporary", "debug"):
run_argv = run_argv + " --{}".format(dp_key)

if dp_key == "help":
Expand Down

0 comments on commit 7b60995

Please sign in to comment.