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/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")
|
||||
Reference in New Issue
Block a user