From 98263e6af2c28b33ed3960e462b9b2cb1bc12590 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Fri, 11 Oct 2019 16:30:01 +0200 Subject: [PATCH] Updated .gitignore. Added --verbose parameter to gcdstruct.py. --- .gitignore | 3 +++ gcdstruct.py | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) 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)