-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (18 loc) · 754 Bytes
/
Copy pathmain.py
File metadata and controls
29 lines (18 loc) · 754 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
29
import os
import sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "utils")))
from interpreter import ThoInterpreter
from utils.rich_logging import logger as log
DEFAULT_SCRIPT_PATH = os.path.join(os.path.dirname(__file__), "checks")
def main() -> None:
while True:
log.info("Enter a valid file within /checks/ to run (or 'exit' to exit): ")
file_name = input()
if file_name == "exit":
break
interpreter = ThoInterpreter(script_file=f"{DEFAULT_SCRIPT_PATH}/{file_name}")
interpreter.parse()
log.info(f"Command Registry: {interpreter.command_registry}")
log.info(f"Ask Registry: {interpreter.ask_registry}")
if __name__ == "__main__":
main()