Update startup
This commit is contained in:
34
horsy.py
34
horsy.py
@@ -21,19 +21,8 @@ args = parser.parse_args()
|
|||||||
option = args.option
|
option = args.option
|
||||||
app = args.app
|
app = args.app
|
||||||
|
|
||||||
# Displaying the logo
|
# Window title
|
||||||
os.system('title horsy')
|
os.system('title horsy')
|
||||||
cls()
|
|
||||||
print('''
|
|
||||||
__ __ _______ ______ _______ __ __
|
|
||||||
| | | || || _ | | || | | |
|
|
||||||
| |_| || _ || | || | _____|| |_| |
|
|
||||||
| || | | || |_||_ | |_____ | |
|
|
||||||
| || |_| || __ ||_____ ||_ _|
|
|
||||||
| _ || || | | | _____| | | |
|
|
||||||
|__| |__||_______||___| |_||_______| |___|
|
|
||||||
Search powered by Algolia
|
|
||||||
''')
|
|
||||||
|
|
||||||
# Checking directories and files
|
# Checking directories and files
|
||||||
if not os.path.exists(horsy_vars.horsypath + 'apps'):
|
if not os.path.exists(horsy_vars.horsypath + 'apps'):
|
||||||
@@ -60,6 +49,22 @@ except:
|
|||||||
|
|
||||||
isNoArgs = False
|
isNoArgs = False
|
||||||
|
|
||||||
|
|
||||||
|
# Function to display logo
|
||||||
|
def log_logo():
|
||||||
|
cls()
|
||||||
|
print('''
|
||||||
|
__ __ _______ ______ _______ __ __
|
||||||
|
| | | || || _ | | || | | |
|
||||||
|
| |_| || _ || | || | _____|| |_| |
|
||||||
|
| || | | || |_||_ | |_____ | |
|
||||||
|
| || |_| || __ ||_____ ||_ _|
|
||||||
|
| _ || || | | | _____| | | |
|
||||||
|
|__| |__||_______||___| |_||_______| |___|
|
||||||
|
Search powered by Algolia
|
||||||
|
''')
|
||||||
|
|
||||||
|
|
||||||
# Checking if the user has a new VT key
|
# Checking if the user has a new VT key
|
||||||
if args.vt_key:
|
if args.vt_key:
|
||||||
if args.vt_key != 'disable':
|
if args.vt_key != 'disable':
|
||||||
@@ -72,13 +77,14 @@ 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:
|
||||||
|
log_logo()
|
||||||
option = ['install', 'uninstall', 'source', 'list', 'upload', 'search', 'info'][
|
option = ['install', 'uninstall', 'source', 'list', 'upload', 'search', 'info'][
|
||||||
tui.menu(['install app', 'uninstall app', 'get source', '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
|
||||||
|
|
||||||
if not args.app:
|
if not args.app and option not in ['list', 'upload', 'update']:
|
||||||
if option not in ['list', 'upload', 'update']:
|
log_logo()
|
||||||
print('\n')
|
print('\n')
|
||||||
app = tui.get(f'Select app to {option}')
|
app = tui.get(f'Select app to {option}')
|
||||||
|
|
||||||
|
|||||||
@@ -3,3 +3,7 @@ import os
|
|||||||
|
|
||||||
def cls():
|
def cls():
|
||||||
os.system('cls' if os.name == 'nt' else 'clear')
|
os.system('cls' if os.name == 'nt' else 'clear')
|
||||||
|
|
||||||
|
|
||||||
|
def softcls():
|
||||||
|
print('\n' * os.get_terminal_size().lines)
|
||||||
|
|||||||
Reference in New Issue
Block a user