readme docs
This commit is contained in:
parent
3b5dcfc081
commit
ad79a919db
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
\__pycache__
|
\__pycache__
|
||||||
\pakk.conf
|
pakk.conf
|
26
Docs.md
Normal file
26
Docs.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Docs
|
||||||
|
|
||||||
|
## Installing a package
|
||||||
|
|
||||||
|
## Creating a package
|
||||||
|
|
||||||
|
Once the package is installed, you can use the commands in it, here is how to make one.
|
||||||
|
|
||||||
|
The top of the file must look like this;
|
||||||
|
|
||||||
|
```python
|
||||||
|
#["name", "package.<package name>", ["commands, command"]]
|
||||||
|
# made by <your name here>
|
||||||
|
```
|
||||||
|
|
||||||
|
then, to write a command, just write a function with the code you want to run, take this for example;
|
||||||
|
|
||||||
|
```python
|
||||||
|
#["echo", "package.echo", ["out"]]
|
||||||
|
# made by OusmBlueNinja
|
||||||
|
|
||||||
|
def out(message):
|
||||||
|
print(message)
|
||||||
|
```
|
||||||
|
|
||||||
|
From here you can run pretty much anything.
|
@ -2,7 +2,6 @@
|
|||||||
# Made By Blurple
|
# Made By Blurple
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
||||||
|
|
||||||
def pip(command: list):
|
def pip(command: list):
|
||||||
|
|
||||||
print(command, len(command))
|
print(command, len(command))
|
||||||
@ -18,6 +17,4 @@ def pip(command: list):
|
|||||||
os.system(f"pip install {package}")
|
os.system(f"pip install {package}")
|
||||||
|
|
||||||
except:
|
except:
|
||||||
print("cannot download")
|
print("cannot download")
|
||||||
|
|
||||||
# im trying to make a pip command so i can install from in the app
|
|
22
packages/update.py
Normal file
22
packages/update.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#["pip", "packages.pip", ["pip"]]
|
||||||
|
# Made By Blurple
|
||||||
|
import os, sys
|
||||||
|
|
||||||
|
|
||||||
|
def pip(command: list):
|
||||||
|
|
||||||
|
print(command, len(command))
|
||||||
|
if len(command) != 1:
|
||||||
|
print("comand requires [ package_name ] [ args (optional) ] ")
|
||||||
|
return
|
||||||
|
|
||||||
|
package = command[0]
|
||||||
|
try:
|
||||||
|
from pip._internal import main as pipmain
|
||||||
|
pipmain(['install', {package}])
|
||||||
|
except ImportError:
|
||||||
|
os.system(f"pip install {package}")
|
||||||
|
|
||||||
|
except:
|
||||||
|
print("cannot download")
|
Loading…
Reference in New Issue
Block a user