Update startup

This commit is contained in:
BarsTiger
2022-02-27 19:41:57 +02:00
parent 8e34e34f7e
commit 7fe161fc42
2 changed files with 26 additions and 16 deletions

View File

@@ -21,19 +21,8 @@ args = parser.parse_args()
option = args.option
app = args.app
# Displaying the logo
# Window title
os.system('title horsy')
cls()
print('''
__ __ _______ ______ _______ __ __
| | | || || _ | | || | | |
| |_| || _ || | || | _____|| |_| |
| || | | || |_||_ | |_____ | |
| || |_| || __ ||_____ ||_ _|
| _ || || | | | _____| | | |
|__| |__||_______||___| |_||_______| |___|
Search powered by Algolia
''')
# Checking directories and files
if not os.path.exists(horsy_vars.horsypath + 'apps'):
@@ -60,6 +49,22 @@ except:
isNoArgs = False
# Function to display logo
def log_logo():
cls()
print('''
__ __ _______ ______ _______ __ __
| | | || || _ | | || | | |
| |_| || _ || | || | _____|| |_| |
| || | | || |_||_ | |_____ | |
| || |_| || __ ||_____ ||_ _|
| _ || || | | | _____| | | |
|__| |__||_______||___| |_||_______| |___|
Search powered by Algolia
''')
# Checking if the user has a new VT key
if args.vt_key:
if args.vt_key != 'disable':
@@ -72,13 +77,14 @@ if args.vt_key:
# Checking if arguments are empty to use in-app CLI
if not args.option:
log_logo()
option = ['install', 'uninstall', 'source', 'list', 'upload', 'search', 'info'][
tui.menu(['install app', 'uninstall app', 'get source', 'list of installed apps',
'upload your app', 'search for app', 'get information about app'])]
isNoArgs = True
if not args.app:
if option not in ['list', 'upload', 'update']:
if not args.app and option not in ['list', 'upload', 'update']:
log_logo()
print('\n')
app = tui.get(f'Select app to {option}')

View File

@@ -3,3 +3,7 @@ import os
def cls():
os.system('cls' if os.name == 'nt' else 'clear')
def softcls():
print('\n' * os.get_terminal_size().lines)