Compare commits

...

2 Commits

Author SHA1 Message Date
Neocky
2a7372dae1 Added new start pluGET topic
Changes:
- added docs to launch pluGET on linux
2021-03-28 17:41:55 +02:00
Neocky
31a2a4aa89 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
2021-03-28 16:15:03 +02:00
5 changed files with 29 additions and 11 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
}

View File

@@ -108,12 +108,25 @@ When run the first time, the `config.ini` file will be created in the root packa
Edit the config to your needs and relaunch pluGET.
**Now you are good to go!**
## Start pluGET
### Windows:
Execute the `launcher.bat` in the `\pluGET` folder.
This will launch pluGET correctly.
### Linux:
Use `cd` to change into the `/pluGET` directory and change the permission of the `launcher.sh` to make it executeable:
```
$ chmod +x launcher.sh
```
Execute the `launcher.sh` file:
```
$ ./launcher.sh
```
> On both OS you can also launch the `src/__main__.py` file.
## Usage
> As always, if you update plugins, shut down your server!
Execute the `launcher.bat` in the `\pluGET` folder. This will launch pluGET correctly.
Another way is to launch the `src\__main__.py` file.
The following are examples of input for the general usage:
(Hint: [thingsInBrackets] are optional & 'all' can always be exchanged through the plugin name or the plugin id and reverse)

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"]