Made config path correct; Deleted unnecessary stuff; Beautified outpout; Plugin version now correct;

Changes:
- config path will always be correct
- deleted unnexessary stuff
- plugin version will display now correct
- changed some formating
- created SFTP check before launching
This commit is contained in:
Neocky
2021-03-13 22:09:32 +01:00
parent 3fed1580f8
commit ddb5f1172e
9 changed files with 45 additions and 69 deletions

View File

@@ -1,9 +1,9 @@
# Handles the console output
from os import system
from os import name
def consoleTitle():
system("title " + "pluGET │ by Neocky")
system("title " + "pluGET │ By Neocky")
def clearConsole():
@@ -72,7 +72,7 @@ def printLogo():
oColors.standardWhite)
print()
print()
print(oColors.brightYellow + " [" + oColors.darkMagenta + "by Neocky" +
print(oColors.brightYellow + " [" + oColors.darkMagenta + "By Neocky" +
oColors.brightYellow + "] " + oColors.standardWhite)
print()
@@ -84,9 +84,3 @@ def printHorizontalLine():
def printMainMenu():
printLogo()
printHorizontalLine()
#print(" [1] Download a specific package")
#print(" [2] Get update info of package")
#print(" [3] Search for a plugin")
#print(" [4] Download latest version of package")
#print(" [5] Check update for installed plugins")
#print()

View File

@@ -6,6 +6,7 @@ import requests
from utils.consoleoutput import oColors
from handlers.handle_config import checkConfig
from handlers.handle_sftp import createSFTPConnection
def getHelp():
@@ -45,12 +46,13 @@ def apiTest():
def check_requirements():
apiTest()
check_local_plugin_folder()
# sftp test
if not checkConfig().localPluginFolder:
createSFTPConnection()
def createTempPluginFolder():
tempPluginFolder = ".\\plugins"
if not os.path.isdir(tempPluginFolder):
#print(oColors.brightRed + "Plugin folder coulnd*t be found. Creating one..." + oColors.standardWhite)
try:
os.mkdir(tempPluginFolder)
except OSError: