1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 15:04:31 +00:00

Split msgdis from extract_assets (#1723)

* split msgdis from extract_assets

* move import
This commit is contained in:
Dragorn421 2024-02-06 02:40:31 +01:00 committed by GitHub
parent c240184229
commit 9da4e17c8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 16 deletions

21
tools/msgdis.py Normal file → Executable file
View file

@ -5,6 +5,7 @@
import re, struct
from os import path
import argparse
# ===================================================
# Util
@ -404,3 +405,23 @@ def extract_all_text(text_out, staff_text_out):
with open(staff_text_out, "w", encoding="utf8") as outfile:
outfile.write(out.strip() + "\n")
def main():
parser = argparse.ArgumentParser(
description="Extract text from the baserom into .h files"
)
parser.add_argument("--text-out", help="Path to output .h file for text")
parser.add_argument(
"--staff-text-out", help="Path to output .h file for staff text"
)
args = parser.parse_args()
if not (args.text_out or args.staff_text_out):
parser.error("No output file requested")
extract_all_text(args.text_out, args.staff_text_out)
if __name__ == "__main__":
main()