-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.py
executable file
·50 lines (39 loc) · 1.38 KB
/
menu.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python3
# Imports
import os
from colorama import Fore
from colorama import Style
from simple_term_menu import TerminalMenu
# Vars
options = [
"Automatic (suggests hooks groups based on file extensions and let's you pick the rest)",
"Manual (you manually pick every hook group)",
"exit",
]
terminal_menu = TerminalMenu(options)
# Funcs
def clear(): # CLEAR SCREEN (get func from a helper sort of file?)
os.system("cls" if os.name == "nt" else "clear")
def main():
clear()
print(
f"""{Fore.YELLOW} {Fore.RED}____ _____ _ _____ ____ _____ ___ ____
{Fore.YELLOW} _ __ _ __ ___ {Fore.RED}/ ___|| ____| | | ____/ ___|_ _/ _ \| _ \
{Fore.YELLOW} | '_ \| '__/ _ \____{Fore.RED}\___ \| _| | | | _|| | | || | | | |_) |
{Fore.YELLOW} | |_) | | | __/_____{Fore.RED}|__) | |___| |___| |__| |___ | || |_| | _ <
{Fore.YELLOW} | .__/|_| \___| {Fore.RED}|____/|_____|_____|_____\____| |_| \___/|_| \_\\
{Fore.YELLOW} |_|
"""
)
# https://github.com/IngoMeyer441/simple-term-menu # <- styling options and so on
menu_entry_index = terminal_menu.show()
clear()
# print(f"You have selected {options[menu_entry_index]}!")
if menu_entry_index == 0:
print("Automatic")
elif menu_entry_index == 1:
print("Manual")
else:
exit()
if __name__ == "__main__":
main()