-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
executable file
·56 lines (48 loc) · 1.35 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env python3
import argparse
from src.main import run
def parse_args():
parser = argparse.ArgumentParser(
prog="BGG - Which game today?",
description="A board game recommendation assistant of your owned games.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
"-e",
"--expansions",
action="store_true",
help="Include expansions in the recommendations.",
)
parser.add_argument(
"-v", "--verbose", action="store_true", help="Enable verbose output."
)
parser.add_argument(
"-f",
"--fast",
action="store_true",
help="Skip the detailed chat summary and provide quick game recommendations.",
)
parser.add_argument(
"-r",
"--refresh",
action="store_true",
help="Refresh data of already known BGG pages.",
)
parser.add_argument(
"mode",
choices=["db", "chat"],
help="Mode to perform. db refreshes the database, chat starts the chatbot.",
)
return parser.parse_args()
def main():
args = parse_args()
config = {
"verbose": args.verbose,
"fast": args.fast,
"refresh": args.refresh,
"mode": args.mode,
"expansions": args.expansions,
}
run(config)
if __name__ == "__main__":
main()