readme docs

This commit is contained in:
The Color Blurple 2023-08-26 22:52:17 -04:00
parent 3b5dcfc081
commit ad79a919db
5 changed files with 50 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
\__pycache__
\pakk.conf
pakk.conf

26
Docs.md Normal file
View 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.

0
README.md Normal file
View File

View File

@ -2,7 +2,6 @@
# Made By Blurple
import os, sys
def pip(command: list):
print(command, len(command))
@ -18,6 +17,4 @@ def pip(command: list):
os.system(f"pip install {package}")
except:
print("cannot download")
# im trying to make a pip command so i can install from in the app
print("cannot download")

22
packages/update.py Normal file
View 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")