Color & Ico
This commit is contained in:
parent
f553596f87
commit
a8084a934b
|
|
@ -3,19 +3,24 @@ A windows executable for the discordHelper.py script.
|
|||
"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
import discordHelper
|
||||
import time
|
||||
|
||||
# All modules must be loaded before the main program is run.
|
||||
from modules import spidey_test, test_template
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
argv = sys.argv[1:]
|
||||
if len(argv) == 0:
|
||||
user_path = os.path.join(os.path.expanduser("~"), "Documents", "DiscordHelper")
|
||||
argv = f"--all --launch --continue --timeout 12 --gen-data {user_path}/new_test_data_{int(time.time())}.yaml".split(" ")
|
||||
try:
|
||||
argv = sys.argv[1:]
|
||||
if len(argv) == 0:
|
||||
user_path = os.path.join(os.path.expanduser("~"), "Documents", "DiscordHelper")
|
||||
argv = f"--all --launch --continue --timeout 12 --gen-data {user_path}/new_test_data_{int(time.time())}.yaml".split(" ")
|
||||
|
||||
args = discordHelper.argument_parser.parse(argv)
|
||||
discordHelper.main(args)
|
||||
args = discordHelper.argument_parser.parse(argv)
|
||||
|
||||
discordHelper.main(args)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print("An error occured, please check the console for more information...")
|
||||
time.sleep(5)
|
||||
sys.exit(1)
|
||||
|
|
|
|||
|
|
@ -175,13 +175,3 @@ class AgnosticPaths:
|
|||
:rtype: str
|
||||
"""
|
||||
return self.main_path
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
path = AgnosticPaths("")
|
||||
print(path)
|
||||
print(path.version)
|
||||
print(path.list())
|
||||
print(path())
|
||||
print(path("resources", "bootstrap")) # Return the main_path plus resources, bootstrap
|
||||
print(path.list_dir_files("resources", "bootstrap")) # List the base_path/resources/bootstrap and return [[folders], [files]]
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ All modules that can be tested
|
|||
Associate the arguments passed to the command line with the modules to be loaded
|
||||
argparse argument : [module_name, class_name]
|
||||
"""
|
||||
from termcolor import colored, cprint
|
||||
os.system('color')
|
||||
|
||||
_TEST_MODULES = {
|
||||
"spidey": ["spidey_test", "SpideyTest"],
|
||||
#"test_walk": ["test_template", "TestWalkTemplate"],
|
||||
|
|
@ -22,27 +25,23 @@ POST_RUN_ALLOWED = False
|
|||
|
||||
queue_lock = threading.Lock()
|
||||
|
||||
CLEAR_CODE = r"""
|
||||
CLEAR_CODE = colored(r"""
|
||||
_______ _
|
||||
(_______) |
|
||||
_ | | _____ _____ ____
|
||||
| | | || ___ (____ |/ ___)
|
||||
| |_____| || ____/ ___ | |
|
||||
\______)\_)_____)_____|_|
|
||||
"""
|
||||
""", 'green')
|
||||
|
||||
INFECTED_CODE = r"""
|
||||
INFECTED_CODE = colored(r"""
|
||||
_ ___ _
|
||||
| | / __) _ | |
|
||||
| |____ _| |__ _____ ____ _| |_ _____ __| |
|
||||
| | _ (_ __) ___ |/ ___|_ _) ___ |/ _ |
|
||||
| | | | || | | ____( (___ | |_| ____( (_| |
|
||||
|_|_| |_||_| |_____)\____) \__)_____)\____|
|
||||
"""
|
||||
|
||||
if os.name == "nt":
|
||||
CLEAR_CODE = r"[32m" + CLEAR_CODE + r"[0m"
|
||||
INFECTED_CODE = r"[91m" + INFECTED_CODE + r"[0m"
|
||||
""", 'red')
|
||||
|
||||
|
||||
class TestRunner:
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 316 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 371 KiB |
|
|
@ -41,4 +41,5 @@ exe = EXE(
|
|||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon='ressources/DiscordHelper.ico',
|
||||
)
|
||||
|
|
|
|||
Reference in New Issue