Final refactor
This commit is contained in:
10
horsy.py
10
horsy.py
@@ -9,9 +9,9 @@ import modules.vars as horsy_vars
|
|||||||
|
|
||||||
# Getting the arguments
|
# Getting the arguments
|
||||||
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 | list/l | '
|
||||||
'upload | search | info | like | dislike)',
|
'upload | search | info | like | dislike)',
|
||||||
choices=['install', 'i', 'uninstall', 'un', 'source', 's', 'update', 'u', 'list', 'l', 'upload',
|
choices=['install', 'i', 'uninstall', 'un', 'source', 's', 'list', 'l', 'upload',
|
||||||
'search', 'info', 'like', 'dislike'],
|
'search', 'info', 'like', 'dislike'],
|
||||||
nargs='?')
|
nargs='?')
|
||||||
parser.add_argument('app', help='app to do function with', nargs='?')
|
parser.add_argument('app', help='app to do function with', nargs='?')
|
||||||
@@ -71,8 +71,8 @@ if args.vt_key:
|
|||||||
|
|
||||||
# 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', 'search', 'info'][
|
option = ['install', 'uninstall', 'source', 'list', 'upload', 'search', 'info'][
|
||||||
tui.menu(['install app', 'uninstall app', 'get source', 'update app', 'list of installed apps',
|
tui.menu(['install app', 'uninstall app', 'get source', 'list of installed apps',
|
||||||
'upload your app', 'search for app', 'get information about app'])]
|
'upload your app', 'search for app', 'get information about app'])]
|
||||||
isNoArgs = True
|
isNoArgs = True
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ if not args.app:
|
|||||||
app = tui.get(f'Select app to {option}')
|
app = tui.get(f'Select app to {option}')
|
||||||
|
|
||||||
# Checking user option (Yanderedev method)
|
# Checking user option (Yanderedev method)
|
||||||
if option in 'upload':
|
if option in ['upload']:
|
||||||
from modules.uploader import upload
|
from modules.uploader import upload
|
||||||
upload()
|
upload()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
protocol = "http://"
|
protocol = "https://"
|
||||||
server_url = 'localhost:60666'
|
server_url = 'horsy.ml'
|
||||||
horsypath = os.popen('echo %HORSYPATH%').read().replace('\n', '') + '/'
|
horsypath = os.popen('echo %HORSYPATH%').read().replace('\n', '') + '/'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"APP_ID": "VBUJO9OW62",
|
"APP_ID": "2FJWM0BURZ",
|
||||||
"API_KEY": "759f6c7986842fd8218e79e3b9ddb964"
|
"API_KEY": "367b667ea79269e1afc245f9d5372708"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user