Merge pull request #2 from GirlInPurple/main

readme, docs, and merge
This commit is contained in:
OusmBlueNinja 2023-08-26 21:54:32 -05:00 committed by GitHub
commit b4bf74ab45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 6 deletions

4
.gitignore vendored
View File

@ -1,3 +1,3 @@
\__pycache__
\pakk.conf
.pyc
pakk.conf
.pyc

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))
@ -19,6 +18,4 @@ def pip(command: list):
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")