From f6644f7717c73df46cc36ccb069b6f5a2ac65660 Mon Sep 17 00:00:00 2001 From: Heiko Joerg Schick Date: Tue, 5 Sep 2023 11:14:05 +0200 Subject: [PATCH] Added main entry point --- yolo.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/yolo.py b/yolo.py index 5b2fec6..782d0c2 100755 --- a/yolo.py +++ b/yolo.py @@ -163,9 +163,6 @@ def call_open_ai(query): return response.choices[0].message.content.strip() -#Enable color output on Windows using colorama -init() - def check_for_issue(response): """ Todo @@ -235,9 +232,21 @@ def evaluate_input(user_input, command): pyperclip.copy(command) print("Copied command to clipboard.") -res_command = call_open_ai(user_prompt) -check_for_issue(res_command) -check_for_markdown(res_command) -user_input = prompt_user_input(res_command) -print() -evaluate_input(user_input, res_command) + +def main(): + """ + Defined starting point of source code. + """ + + #Enable color output on Windows using colorama + init() + + res_command = call_open_ai(user_prompt) + check_for_issue(res_command) + check_for_markdown(res_command) + user_input = prompt_user_input(res_command) + print() + evaluate_input(user_input, res_command) + +if __name__ == "__main__": + main() \ No newline at end of file