diff --git a/.gitignore b/.gitignore index 0863824..803ab2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ __pycache__/ *.bin +*.rcp *.gcd +*.rgn +/docs/ diff --git a/gcdstruct.py b/gcdstruct.py index e048247..dec55e5 100644 --- a/gcdstruct.py +++ b/gcdstruct.py @@ -8,11 +8,23 @@ Prints out the structure of the given GCD file. from grmn import Gcd, ChkSum import sys -FILE = sys.argv[1] +if len(sys.argv) <= 2: + VERBOSE = False + FILE = sys.argv[1] +elif sys.argv[1] == "--verbose": + VERBOSE = True + FILE = sys.argv[2] +elif sys.argv[2] == "--verbose": + VERBOSE = True + FILE = sys.argv[1] print("Opening {}".format(FILE)) gcd = Gcd(FILE) -gcd.print_struct() +if VERBOSE: + gcd.print_struct_full() +else: + gcd.print_struct() + gcd.validate(True)