-
-
Notifications
You must be signed in to change notification settings - Fork 185
Expand file tree
/
Copy path__init__.py
More file actions
28 lines (18 loc) · 629 Bytes
/
__init__.py
File metadata and controls
28 lines (18 loc) · 629 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from argparse import ArgumentParser
from UnityPy.cli.update_tpk import update_tpk
def main():
parser = ArgumentParser(
prog="UnityPy",
description="UnityPy cli utility",
)
subparsers = parser.add_subparsers(title="utils")
update_tpk_parser = subparsers.add_parser("update_tpk", help="Updates TPK (typetree dump) file")
update_tpk_parser.set_defaults(func=update_tpk)
args = parser.parse_args()
if not hasattr(args, "func"):
parser.print_help()
return
operands = getattr(args, "operands", [])
args.func(*operands)
if __name__ == "__main__":
main()