-
Notifications
You must be signed in to change notification settings - Fork 0
/
object_patcher.py
45 lines (38 loc) · 1.18 KB
/
object_patcher.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import argparse
import asyncio
import logging
from tts_client.tts_protocol import tts_push_object
def _get_argparser():
parser = argparse.ArgumentParser(description="Tabletop Simulator Dev server")
parser.add_argument(
"--output-dir",
type=str,
help="The output path for autogenerated files what will be consumed when sending files",
)
parser.add_argument(
"--file",
type=str,
help="File push",
required=False,
)
parser.add_argument("--object", type=str, help="Object guid", required=True)
parser.add_argument(
"--libdir", help="Path to search for ttslua libs", action="append"
)
parser.add_argument(
"-v", "--verbose", help="increase output verbosity", action="store_true"
)
return parser
if __name__ == "__main__":
parser = _get_argparser()
args = parser.parse_args()
logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO)
# snippet = args.selected_text
asyncio.run(
tts_push_object(
file_path=args.file,
object=args.object,
export_dir=args.output_dir,
lib_dirs=args.libdir,
)
)