From 004991cf8ff93b6cc0bd3e2fbc1bf5056d6d7591 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Sun, 23 Jan 2022 21:54:02 +0200 Subject: [PATCH] New search option in dev --- horsy.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/horsy.py b/horsy.py index f7dd239..0a2469f 100644 --- a/horsy.py +++ b/horsy.py @@ -9,7 +9,8 @@ from uploader import upload parser = argparse.ArgumentParser(description='horsy - the best package manager') parser.add_argument('option', help='options for horsy (install/i | uninstall/un | source/s | update/u | list/l | ' 'upload)', - choices=['install', 'i', 'uninstall', 'un', 'source', 's', 'update', 'u', 'list', 'l', 'upload'], + choices=['install', 'i', 'uninstall', 'un', 'source', 's', 'update', 'u', 'list', 'l', 'upload', + 'search'], nargs='?') parser.add_argument('app', help='app to install/uninstall/download source', nargs='?') parser.add_argument('--vt', help='your virustotal api key (account -> api key in VT)', dest='vt_key') @@ -25,7 +26,6 @@ if args.vt_key: else: add_to_cfg(None) - # Checking directories and files if not os.path.exists('apps'): os.makedirs('apps') @@ -51,10 +51,9 @@ isNoArgs = False # Checking if arguments are empty to use in-app CLI if not args.option: - option = ['install', 'uninstall', 'source', 'update', 'list', 'upload'][tui.menu(['install app', 'uninstall app', - 'get source', 'update app', - 'list of installed apps', - 'upload your app'])] + option = ['install', 'uninstall', 'source', 'update', 'list', 'upload', 'search'][ + tui.menu(['install app', 'uninstall app', 'get source', 'update app', 'list of installed apps', + 'upload your app', 'search for app'])] isNoArgs = True if not args.app: