From 39b280866a3ec5d2c42d530933a3de1dc16176ee Mon Sep 17 00:00:00 2001 From: PikminGuts92 Date: Thu, 18 Jan 2024 08:45:51 -0500 Subject: [PATCH] Add python script for reading ark info --- scripts/read_ark.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/read_ark.py diff --git a/scripts/read_ark.py b/scripts/read_ark.py new file mode 100644 index 0000000..34c6581 --- /dev/null +++ b/scripts/read_ark.py @@ -0,0 +1,18 @@ +import grim +import sys + +def main(args: list[str]): + ark_path = args[0] + print(f'Opening ark from \'{ark_path}\'') + + ark = grim.Ark.from_file_path(ark_path) + ark_entries = ark.entries + + print(f'Ark: (version = {ark.version}, encryption = {ark.encryption})') + print(f'Found {len(ark_entries)} entries') + + for entry in ark_entries: + print(entry.path) + +if __name__ == '__main__': + main(sys.argv[1:]) \ No newline at end of file