Updated .gitignore. Added --verbose parameter to gcdstruct.py.
This commit is contained in:
parent
d33ed7ef55
commit
98263e6af2
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
*.bin
|
*.bin
|
||||||
|
*.rcp
|
||||||
*.gcd
|
*.gcd
|
||||||
|
*.rgn
|
||||||
|
/docs/
|
||||||
|
12
gcdstruct.py
12
gcdstruct.py
@ -8,11 +8,23 @@ Prints out the structure of the given GCD file.
|
|||||||
from grmn import Gcd, ChkSum
|
from grmn import Gcd, ChkSum
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
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]
|
FILE = sys.argv[1]
|
||||||
|
|
||||||
print("Opening {}".format(FILE))
|
print("Opening {}".format(FILE))
|
||||||
|
|
||||||
gcd = Gcd(FILE)
|
gcd = Gcd(FILE)
|
||||||
|
|
||||||
|
if VERBOSE:
|
||||||
|
gcd.print_struct_full()
|
||||||
|
else:
|
||||||
gcd.print_struct()
|
gcd.print_struct()
|
||||||
|
|
||||||
gcd.validate(True)
|
gcd.validate(True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user