Well, this is after the 4/29 turmoil and everything seems to be working... Some of the stuff was not commited before the turmoil. However, it seems intact here... My next plan of action is full "disk" encyption with the P7C_ENC protocol and adding built-in P7C and other apps, converting them into "terminal line" tools.
This commit is contained in:
0
scripts/__init__.py
Normal file → Executable file
0
scripts/__init__.py
Normal file → Executable file
0
scripts/color_print/__init__.py
Executable file
0
scripts/color_print/__init__.py
Executable file
38
scripts/color_print/color_print.py
Executable file
38
scripts/color_print/color_print.py
Executable file
@@ -0,0 +1,38 @@
|
||||
class Colors:
|
||||
PURPLE = '\033[95m'
|
||||
DARKBLUE = '\033[94m'
|
||||
DARKGREEN = '\033[96m'
|
||||
GREEN = '\033[92m'
|
||||
ORANGE = '\033[93m'
|
||||
DARKRED = '\033[91m'
|
||||
RESET = '\033[0m'
|
||||
EMPHASIS = '\033[1m'
|
||||
UNDERLINE = '\033[4m'
|
||||
|
||||
def cprint(text, color, sameline=None):
|
||||
color = color.upper()
|
||||
newline = "\n"
|
||||
if sameline:
|
||||
newline = ""
|
||||
if color == "PURPLE":
|
||||
print(f"{Colors.PURPLE}{text}{Colors.RESET}", end = newline)
|
||||
elif color == "DARKGREEN":
|
||||
print(f"{Colors.DARKGREEN}{text}{Colors.RESET}", end = newline)
|
||||
elif color == "DARKBLUE":
|
||||
print(f"{Colors.DARKBLUE}{text}{Colors.RESET}", end = newline)
|
||||
elif color == "GREEN":
|
||||
print(f"{Colors.GREEN}{text}{Colors.RESET}", end = newline)
|
||||
elif color == "ORANGE":
|
||||
print(f"{Colors.ORANGE}{text}{Colors.RESET}", end = newline)
|
||||
elif color == "DARKRED":
|
||||
print(f"{Colors.DARKRED}{text}{Colors.RESET}", end = newline)
|
||||
elif color == "EMPHASIS":
|
||||
print(f"{Colors.EMPHASIS}{text}{Colors.RESET}", end = newline)
|
||||
elif color == "UNDERLINE":
|
||||
print(f"{Colors.UNDERLINE}{text}{Colors.RESET}", end = newline)
|
||||
elif color == "RESET":
|
||||
print(f"{Colors.RESET}{text}", end = newline)
|
||||
|
||||
# print(f"{Colors.OKGREEN}Success:{Colors.ENDC} Build completed.")
|
||||
|
||||
# cprint("this is some text", "PURPLE")
|
||||
0
scripts/exit/__init__.py
Normal file → Executable file
0
scripts/exit/__init__.py
Normal file → Executable file
3
scripts/exit/exit.py
Normal file → Executable file
3
scripts/exit/exit.py
Normal file → Executable file
@@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from ..color_print import color_print
|
||||
def main(args):
|
||||
print("Exiting BUGPy!")
|
||||
color_print.cprint("Exiting BUGPy!", "GREEN")
|
||||
sys.exit(0)
|
||||
|
||||
0
scripts/help/__init__.py
Normal file → Executable file
0
scripts/help/__init__.py
Normal file → Executable file
12
scripts/help/help.py
Normal file → Executable file
12
scripts/help/help.py
Normal file → Executable file
@@ -1,2 +1,12 @@
|
||||
from ..color_print import color_print
|
||||
def main(args):
|
||||
print("An unfinished help section! Yay")
|
||||
# Title
|
||||
color_print.cprint("HELP SECTION", "ORANGE")
|
||||
print("=" * 40)
|
||||
|
||||
# Entries
|
||||
color_print.cprint("pointerfile.txt", "GREEN", sameline=True); print(": command aliases")
|
||||
|
||||
|
||||
# Newline
|
||||
print("")
|
||||
|
||||
0
scripts/list_files/__init__.py
Normal file → Executable file
0
scripts/list_files/__init__.py
Normal file → Executable file
0
scripts/list_files/config.txt
Normal file → Executable file
0
scripts/list_files/config.txt
Normal file → Executable file
4
scripts/list_files/list_files.py
Normal file → Executable file
4
scripts/list_files/list_files.py
Normal file → Executable file
@@ -1,4 +1,5 @@
|
||||
from pathlib import Path
|
||||
from ..color_print import color_print
|
||||
|
||||
def main(args):
|
||||
# Set the directory path
|
||||
@@ -10,9 +11,10 @@ def main(args):
|
||||
if args == []:
|
||||
for entry in dir_path.iterdir():
|
||||
if entry.is_dir():
|
||||
print(f"[FOLDER] {entry.name}")
|
||||
color_print.cprint(f"[FOLDER] {entry.name}", "DARKBLUE")
|
||||
elif entry.is_file():
|
||||
print(f"[FILE] {entry.name}")
|
||||
print()
|
||||
elif args == ["--help"] or args == ["-h"]:
|
||||
print("list_files: Bro is lazy on doing this help section")
|
||||
else:
|
||||
|
||||
0
scripts/make_directory/__init__.py
Executable file
0
scripts/make_directory/__init__.py
Executable file
17
scripts/make_directory/make_directory.py
Executable file
17
scripts/make_directory/make_directory.py
Executable file
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
def main(args):
|
||||
if not args:
|
||||
print("make_directory: no arguments were given")
|
||||
return
|
||||
|
||||
for item in args:
|
||||
# Get the ABSOLUTE path to be 100% sure where it's going
|
||||
dir_path = Path(item).resolve()
|
||||
|
||||
try:
|
||||
dir_path.mkdir(parents=True, exist_ok=True)
|
||||
# This line is key: it tells you EXACTLY where it went
|
||||
except Exception as e:
|
||||
print(f"make_directory: error creating directory {item}: {e}")
|
||||
0
scripts/make_file/__init__.py
Normal file → Executable file
0
scripts/make_file/__init__.py
Normal file → Executable file
0
scripts/make_file/config.txt
Normal file → Executable file
0
scripts/make_file/config.txt
Normal file → Executable file
0
scripts/make_file/make_file.py
Normal file → Executable file
0
scripts/make_file/make_file.py
Normal file → Executable file
0
scripts/remove/__init__.py
Normal file → Executable file
0
scripts/remove/__init__.py
Normal file → Executable file
0
scripts/remove/config.txt
Normal file → Executable file
0
scripts/remove/config.txt
Normal file → Executable file
0
scripts/remove/remove.py
Normal file → Executable file
0
scripts/remove/remove.py
Normal file → Executable file
0
scripts/say_greeting/__init__.py
Normal file → Executable file
0
scripts/say_greeting/__init__.py
Normal file → Executable file
0
scripts/say_greeting/config.txt
Normal file → Executable file
0
scripts/say_greeting/config.txt
Normal file → Executable file
0
scripts/say_greeting/say_greeting.py
Normal file → Executable file
0
scripts/say_greeting/say_greeting.py
Normal file → Executable file
0
scripts/touch_file/__init__.py
Normal file → Executable file
0
scripts/touch_file/__init__.py
Normal file → Executable file
0
scripts/touch_file/config.txt
Normal file → Executable file
0
scripts/touch_file/config.txt
Normal file → Executable file
0
scripts/touch_file/touch_file.py
Normal file → Executable file
0
scripts/touch_file/touch_file.py
Normal file → Executable file
Reference in New Issue
Block a user