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 os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import discordHelper
|
import discordHelper
|
||||||
import time
|
import time
|
||||||
|
|
||||||
# All modules must be loaded before the main program is run.
|
# All modules must be loaded before the main program is run.
|
||||||
from modules import spidey_test, test_template
|
from modules import spidey_test, test_template
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
argv = sys.argv[1:]
|
try:
|
||||||
if len(argv) == 0:
|
argv = sys.argv[1:]
|
||||||
user_path = os.path.join(os.path.expanduser("~"), "Documents", "DiscordHelper")
|
if len(argv) == 0:
|
||||||
argv = f"--all --launch --continue --timeout 12 --gen-data {user_path}/new_test_data_{int(time.time())}.yaml".split(" ")
|
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)
|
args = discordHelper.argument_parser.parse(argv)
|
||||||
discordHelper.main(args)
|
|
||||||
|
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
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
return self.main_path
|
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
|
Associate the arguments passed to the command line with the modules to be loaded
|
||||||
argparse argument : [module_name, class_name]
|
argparse argument : [module_name, class_name]
|
||||||
"""
|
"""
|
||||||
|
from termcolor import colored, cprint
|
||||||
|
os.system('color')
|
||||||
|
|
||||||
_TEST_MODULES = {
|
_TEST_MODULES = {
|
||||||
"spidey": ["spidey_test", "SpideyTest"],
|
"spidey": ["spidey_test", "SpideyTest"],
|
||||||
#"test_walk": ["test_template", "TestWalkTemplate"],
|
#"test_walk": ["test_template", "TestWalkTemplate"],
|
||||||
|
|
@ -22,27 +25,23 @@ POST_RUN_ALLOWED = False
|
||||||
|
|
||||||
queue_lock = threading.Lock()
|
queue_lock = threading.Lock()
|
||||||
|
|
||||||
CLEAR_CODE = r"""
|
CLEAR_CODE = colored(r"""
|
||||||
_______ _
|
_______ _
|
||||||
(_______) |
|
(_______) |
|
||||||
_ | | _____ _____ ____
|
_ | | _____ _____ ____
|
||||||
| | | || ___ (____ |/ ___)
|
| | | || ___ (____ |/ ___)
|
||||||
| |_____| || ____/ ___ | |
|
| |_____| || ____/ ___ | |
|
||||||
\______)\_)_____)_____|_|
|
\______)\_)_____)_____|_|
|
||||||
"""
|
""", 'green')
|
||||||
|
|
||||||
INFECTED_CODE = r"""
|
INFECTED_CODE = colored(r"""
|
||||||
_ ___ _
|
_ ___ _
|
||||||
| | / __) _ | |
|
| | / __) _ | |
|
||||||
| |____ _| |__ _____ ____ _| |_ _____ __| |
|
| |____ _| |__ _____ ____ _| |_ _____ __| |
|
||||||
| | _ (_ __) ___ |/ ___|_ _) ___ |/ _ |
|
| | _ (_ __) ___ |/ ___|_ _) ___ |/ _ |
|
||||||
| | | | || | | ____( (___ | |_| ____( (_| |
|
| | | | || | | ____( (___ | |_| ____( (_| |
|
||||||
|_|_| |_||_| |_____)\____) \__)_____)\____|
|
|_|_| |_||_| |_____)\____) \__)_____)\____|
|
||||||
"""
|
""", 'red')
|
||||||
|
|
||||||
if os.name == "nt":
|
|
||||||
CLEAR_CODE = r"[32m" + CLEAR_CODE + r"[0m"
|
|
||||||
INFECTED_CODE = r"[91m" + INFECTED_CODE + r"[0m"
|
|
||||||
|
|
||||||
|
|
||||||
class TestRunner:
|
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,
|
target_arch=None,
|
||||||
codesign_identity=None,
|
codesign_identity=None,
|
||||||
entitlements_file=None,
|
entitlements_file=None,
|
||||||
|
icon='ressources/DiscordHelper.ico',
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Reference in New Issue