forked from tryptech/roboco
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
executable file
·39 lines (33 loc) · 769 Bytes
/
main.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
import click
import sys
from loguru import logger
from src.place import PlaceClient
@click.command()
@click.option(
"-d",
"--debug",
is_flag=True,
help="Enable debug mode. Prints debug messages to the console.",
)
@click.option(
"-c",
"--config",
default="config.json",
help="Location of config.json",
)
@click.option(
"-C",
"--canvas",
default="canvas.json",
help="Location of canvas.json",
)
def main(debug: bool, config: str, canvas: str):
if not debug:
# default loguru level is DEBUG
logger.remove()
logger.add(sys.stderr, level="INFO")
client = PlaceClient(config_path=config, canvas_path=canvas)
# Start everything
client.start()
if __name__ == "__main__":
main()