From f6ddecd6c86345c94bd0ad0e1ba634e041702f3e Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Wed, 26 Jan 2022 18:40:38 +0200 Subject: [PATCH] GUI development --- horsygui.py | 1 + modules/manager.py | 9 +++++++-- web_vars/search_app | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 web_vars/search_app diff --git a/horsygui.py b/horsygui.py index 732fcdf..36d6807 100644 --- a/horsygui.py +++ b/horsygui.py @@ -14,6 +14,7 @@ import modules.vars as horsy_vars # Functions +def installed_apps(): # Initialize GUI diff --git a/modules/manager.py b/modules/manager.py index 5e4f2ff..4061487 100644 --- a/modules/manager.py +++ b/modules/manager.py @@ -139,9 +139,14 @@ def uninstall(package, is_gui=False): print(f"[red]App {package} is not installed or doesn't have launch script[/]") -def apps_list(): +def apps_list(is_gui=False): + apps = list() if os.path.exists('{0}apps'.format(horsy_vars.horsypath)): print(f"[green]Installed apps:[/]") for file in os.listdir('{0}apps'.format(horsy_vars.horsypath)): - if file.endswith(".bat"): + if file.endswith(".bat") and not is_gui: print(f"{file.split('.')[0]}") + else: + apps.append(file.split('.')[0]) + if is_gui: + return apps diff --git a/web_vars/search_app b/web_vars/search_app new file mode 100644 index 0000000..423a67d --- /dev/null +++ b/web_vars/search_app @@ -0,0 +1,4 @@ +{ + "APP_ID": "VBUJO9OW62", + "API_KEY": "759f6c7986842fd8218e79e3b9ddb964" +} \ No newline at end of file