Added full linux support & better output when searching

Changes:
- added launcher.sh file to launch pluGET on linux
- beautified output when searching for a ressource
- deleted .vscode folder & added it to the .gitignore list
This commit is contained in:
Neocky 2021-03-28 16:15:03 +02:00
parent aceca0dec3
commit 31a2a4aa89
4 changed files with 14 additions and 9 deletions

3
.gitignore vendored
View File

@ -127,3 +127,6 @@ dmypy.json
# Pyre type checker
.pyre/
# VSCode Settings
.vscode

View File

@ -1,4 +0,0 @@
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true
}

2
launcher.sh Normal file
View File

@ -0,0 +1,2 @@
cd src/
python3 "__main__.py"

View File

@ -56,19 +56,23 @@ def searchPackage(ressourceName):
packageName = doAPIRequest(url)
i = 1
print(oColors.brightBlack + f"Searching: {ressourceName}" + oColors.standardWhite)
print("Index | Name | Description | Downloads")
print("┌─────┬─────────────────────────────┬───────────┬──────────────────────────────────────────────────────────────────────┐")
print("│ No. │ Name │ Downloads │ Description │")
print("└─────┴─────────────────────────────┴───────────┴──────────────────────────────────────────────────────────────────────┘")
for ressource in packageName:
pName = ressource["name"]
newName = handleRegexPackageName(pName)
pTag = ressource["tag"]
pDownloads = ressource["downloads"]
print(f" [{i}]".ljust(8), end='')
print(f" [{i}]".rjust(6), end='')
print(" ", end='')
print(f"{newName}".ljust(30), end='')
print(f"{pTag}".ljust(120), end='')
print(f"{pDownloads}".ljust(7))
print(f"{pDownloads}".rjust(9), end='')
print(" ", end='')
print(f"{pTag}".ljust(120))
i = i + 1
ressourceSelected = int(input("Select your wanted Ressource (Index)(0 to exit): "))
ressourceSelected = int(input("Select your wanted Ressource (No.)(0 to exit): "))
if ressourceSelected != 0:
ressourceSelected = ressourceSelected - 1
ressourceId = packageName[ressourceSelected]["id"]