Added gcddump to dump parsed GCD to files which can later be reassembled

into a GCD.
This commit is contained in:
2018-10-21 01:03:19 +02:00
parent c0a1d833ba
commit 27a90e8b38
3 changed files with 154 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Dumps the structure of the given GCD file to file.
"""
from grmn import Gcd
import sys
if len(sys.argv) < 3:
print("Syntax: {} GCDFILE DUMPFILE (extension .rcp will be added)".format(sys.argv[0]))
sys.exit(1)
FILE = sys.argv[1]
OUTFILE = sys.argv[2]
print("Opening {}".format(FILE))
gcd = Gcd(FILE)
print("Dumping to {}.rcp".format(OUTFILE))
gcd.dump(OUTFILE)