New search option in dev
This commit is contained in:
11
horsy.py
11
horsy.py
@@ -9,7 +9,8 @@ from uploader import upload
|
|||||||
parser = argparse.ArgumentParser(description='horsy - the best package manager')
|
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 | '
|
parser.add_argument('option', help='options for horsy (install/i | uninstall/un | source/s | update/u | list/l | '
|
||||||
'upload)',
|
'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='?')
|
nargs='?')
|
||||||
parser.add_argument('app', help='app to install/uninstall/download source', 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')
|
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:
|
else:
|
||||||
add_to_cfg(None)
|
add_to_cfg(None)
|
||||||
|
|
||||||
|
|
||||||
# Checking directories and files
|
# Checking directories and files
|
||||||
if not os.path.exists('apps'):
|
if not os.path.exists('apps'):
|
||||||
os.makedirs('apps')
|
os.makedirs('apps')
|
||||||
@@ -51,10 +51,9 @@ isNoArgs = False
|
|||||||
|
|
||||||
# Checking if arguments are empty to use in-app CLI
|
# Checking if arguments are empty to use in-app CLI
|
||||||
if not args.option:
|
if not args.option:
|
||||||
option = ['install', 'uninstall', 'source', 'update', 'list', 'upload'][tui.menu(['install app', 'uninstall app',
|
option = ['install', 'uninstall', 'source', 'update', 'list', 'upload', 'search'][
|
||||||
'get source', 'update app',
|
tui.menu(['install app', 'uninstall app', 'get source', 'update app', 'list of installed apps',
|
||||||
'list of installed apps',
|
'upload your app', 'search for app'])]
|
||||||
'upload your app'])]
|
|
||||||
isNoArgs = True
|
isNoArgs = True
|
||||||
|
|
||||||
if not args.app:
|
if not args.app:
|
||||||
|
|||||||
Reference in New Issue
Block a user