List of apps

This commit is contained in:
BarsTiger
2022-01-24 22:25:47 +02:00
parent 14912e76d6
commit ec409b9d69
2 changed files with 13 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ import sys
import modules.tui as tui
from modules.console import cls
from modules.manager import install, uninstall
from modules.manager import install, uninstall, apps_list
from modules.virustotal import add_to_cfg
from modules.uploader import upload
from modules.source import get_source
@@ -18,7 +18,7 @@ parser.add_argument('option', help='options for horsy (install/i | uninstall/un
choices=['install', 'i', 'uninstall', 'un', 'source', 's', 'update', 'u', 'list', 'l', 'upload',
'search', 'info'],
nargs='?')
parser.add_argument('app', help='app to install/uninstall/download source', nargs='?')
parser.add_argument('app', help='app to do function with', nargs='?')
parser.add_argument('--vt', help='your virustotal api key (account -> api key in VT)', dest='vt_key')
args = parser.parse_args()
@@ -87,5 +87,8 @@ if option in ['search']:
if option in ['info']:
info(app)
if option in ['list', 'l']:
apps_list()
if isNoArgs:
input('[EXIT] Press enter to exit horsy...')

View File

@@ -137,3 +137,11 @@ def uninstall(package, is_gui=False):
print(f"[green][OK] Launch script deleted[/]")
else:
print(f"[red]App {package} is not installed or doesn't have launch script[/]")
def 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"):
print(f"{file.split('.')[0]}")