summaryrefslogtreecommitdiff
path: root/extract_assets.py
diff options
context:
space:
mode:
authorAltoXorg <56553686+Alto1772@users.noreply.github.com>2023-01-18 06:05:24 +0800
committerGitHub <noreply@github.com>2023-01-17 17:05:24 -0500
commitb47ba463bccdadca12a8fad99563974ee8238b4a (patch)
treebada0d3a029603ceb8cc5bcc8ad8eb1c230f3d9f /extract_assets.py
parent48a6db34d5125587d27676eb81d51a49bd1335fc (diff)
changes to the asset extraction script (#2068)
- fixes exiting with Ctrl+C on linux - chooseROM returns Z64Rom object in addition to speed - adds simple verbosity for inspecting roms
Diffstat (limited to 'extract_assets.py')
-rwxr-xr-xextract_assets.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/extract_assets.py b/extract_assets.py
index 4e17d45..4983e6c 100755
--- a/extract_assets.py
+++ b/extract_assets.py
@@ -32,17 +32,16 @@ def main():
parser.add_argument("-z", "--zapd", help="Path to ZAPD executable", dest="zapd_exe", type=str)
parser.add_argument("rom", help="Path to the rom", type=str, nargs="?")
parser.add_argument("--non-interactive", help="Runs the script non-interactively for use in build scripts.", dest="non_interactive", action="store_true")
+ parser.add_argument("-v", "--verbose", help="Display rom's header checksums and their corresponding xml folder", dest="verbose", action="store_true")
args = parser.parse_args()
- rom_paths = [ args.rom ] if args.rom else rom_chooser.chooseROM(args.non_interactive)
- for rom_path in rom_paths:
- rom = Z64Rom(rom_path)
-
+ roms = [ Z64Rom(args.rom) ] if args.rom else rom_chooser.chooseROM(args.verbose, args.non_interactive)
+ for rom in roms:
if (os.path.exists("Extract")):
shutil.rmtree("Extract")
- BuildOTR("../soh/assets/xml/" + rom.version.xml_ver + "/", rom_path, zapd_exe=args.zapd_exe)
+ BuildOTR("../soh/assets/xml/" + rom.version.xml_ver + "/", rom.file_path, zapd_exe=args.zapd_exe)
if __name__ == "__main__":
main()