mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
Changed output when checking and removed debug output
Changes: -removed update available columm and integrated it with colors of the plugin name - removed leftover debug output
This commit is contained in:
parent
a4b1b7acf9
commit
1e7b30a1be
@ -149,9 +149,9 @@ def checkInstalledPackage(inputSelectedObject="all", inputOptionalParam=None):
|
|||||||
print(oColors.brightBlack + f"Checking: {inputSelectedObject}" + oColors.standardWhite)
|
print(oColors.brightBlack + f"Checking: {inputSelectedObject}" + oColors.standardWhite)
|
||||||
if inputOptionalParam != "changelog":
|
if inputOptionalParam != "changelog":
|
||||||
print(oColors.brightBlack + f"Use 'check {inputSelectedObject} changelog' to get the latest changelog from plugins" + oColors.standardWhite)
|
print(oColors.brightBlack + f"Use 'check {inputSelectedObject} changelog' to get the latest changelog from plugins" + oColors.standardWhite)
|
||||||
print("┌─────┬────────────────────────────────┬──────────────┬──────────────┬───────────────────┐")
|
print("┌─────┬────────────────────────────────┬──────────────┬──────────────┐")
|
||||||
print("│ No. │ Name │ Installed V. │ Latest V. │ Update available │")
|
print("│ No. │ Name │ Installed V. │ Latest V. │")
|
||||||
print("└─────┴────────────────────────────────┴──────────────┴──────────────┴───────────────────┘")
|
print("└─────┴────────────────────────────────┴──────────────┴──────────────┘")
|
||||||
try:
|
try:
|
||||||
for plugin in track(pluginList, description="Checking for updates" ,transient=True, complete_style="bright_yellow"):
|
for plugin in track(pluginList, description="Checking for updates" ,transient=True, complete_style="bright_yellow"):
|
||||||
if not configValues.localPluginFolder:
|
if not configValues.localPluginFolder:
|
||||||
@ -222,10 +222,15 @@ def checkInstalledPackage(inputSelectedObject="all", inputOptionalParam=None):
|
|||||||
else:
|
else:
|
||||||
print(f" [{i+1}]".rjust(6), end='')
|
print(f" [{i+1}]".rjust(6), end='')
|
||||||
print(" ", end='')
|
print(" ", end='')
|
||||||
|
if pluginIsOutdated == True:
|
||||||
|
print(oColors.brightGreen + f"{fileName}".ljust(33) + oColors.standardWhite, end='')
|
||||||
|
elif pluginIsOutdated == False:
|
||||||
|
print(oColors.brightRed + f"{fileName}".ljust(33) + oColors.standardWhite, end='')
|
||||||
|
else:
|
||||||
print(f"{fileName}".ljust(33), end='')
|
print(f"{fileName}".ljust(33), end='')
|
||||||
|
|
||||||
print(f"{fileVersion}".ljust(15), end='')
|
print(f"{fileVersion}".ljust(15), end='')
|
||||||
print(f"{pluginLatestVersion}".ljust(15), end='')
|
print(f"{pluginLatestVersion}".ljust(15))
|
||||||
print(f"{pluginIsOutdated}".ljust(5) + oColors.standardWhite)
|
|
||||||
if (inputOptionalParam == "changelog" and pluginLatestVersion != 'N/A'):
|
if (inputOptionalParam == "changelog" and pluginLatestVersion != 'N/A'):
|
||||||
print(oColors.brightYellow + f"CHANGELOG {fileName}:" + oColors.standardWhite)
|
print(oColors.brightYellow + f"CHANGELOG {fileName}:" + oColors.standardWhite)
|
||||||
description = getUpdateDescription(pluginId)
|
description = getUpdateDescription(pluginId)
|
||||||
@ -252,9 +257,10 @@ def updateInstalledPackage(inputSelectedObject='all'):
|
|||||||
connection = createFTPConnection()
|
connection = createFTPConnection()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print(oColors.brightBlack + "Selected plugins:" + oColors.standardWhite)
|
print(oColors.brightBlack + "Selected plugins with available Updates:" + oColors.standardWhite)
|
||||||
if inputSelectedObject == "all" or inputSelectedObject == "*":
|
if inputSelectedObject == "all" or inputSelectedObject == "*":
|
||||||
for pluginIndex in range(len(INSTALLEDPLUGINLIST)):
|
for pluginIndex in range(len(INSTALLEDPLUGINLIST)):
|
||||||
|
if INSTALLEDPLUGINLIST[pluginIndex][4] == True:
|
||||||
fileName = getFileName(INSTALLEDPLUGINLIST[pluginIndex][0])
|
fileName = getFileName(INSTALLEDPLUGINLIST[pluginIndex][0])
|
||||||
print(fileName, end=' ')
|
print(fileName, end=' ')
|
||||||
else:
|
else:
|
||||||
|
@ -142,7 +142,6 @@ def paperCheckForUpdate(installedServerjarFullName):
|
|||||||
if not paperVersionBehind:
|
if not paperVersionBehind:
|
||||||
print(oColors.brightRed + f"ERR: An error was encountered while detecting how many versions behind you are. "
|
print(oColors.brightRed + f"ERR: An error was encountered while detecting how many versions behind you are. "
|
||||||
f"Will display as 'N/A'." + oColors.standardWhite)
|
f"Will display as 'N/A'." + oColors.standardWhite)
|
||||||
print(paperVersionBehind)
|
|
||||||
paperVersionBehind = "N/A" # Sets paperVersionBehind to N/A while still letting the versionBehind check return
|
paperVersionBehind = "N/A" # Sets paperVersionBehind to N/A while still letting the versionBehind check return
|
||||||
# False for error-handing reasons.
|
# False for error-handing reasons.
|
||||||
|
|
||||||
@ -195,7 +194,6 @@ def papermc_downloader(paperBuild='latest', installedServerjarName=None, mcVersi
|
|||||||
downloadPath = createTempPluginFolder()
|
downloadPath = createTempPluginFolder()
|
||||||
|
|
||||||
url = f"https://papermc.io/api/v2/projects/paper/versions/{mcVersion}/builds/{paperBuild}/downloads/{downloadFileName}"
|
url = f"https://papermc.io/api/v2/projects/paper/versions/{mcVersion}/builds/{paperBuild}/downloads/{downloadFileName}"
|
||||||
print(url)
|
|
||||||
remotefile = urllib.request.urlopen(url)
|
remotefile = urllib.request.urlopen(url)
|
||||||
filesize = remotefile.info()['Content-Length']
|
filesize = remotefile.info()['Content-Length']
|
||||||
print(f"Getting Paper {paperBuild} for {mcVersion}")
|
print(f"Getting Paper {paperBuild} for {mcVersion}")
|
||||||
|
Loading…
Reference in New Issue
Block a user