-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcli.py
More file actions
45 lines (35 loc) · 1.28 KB
/
cli.py
File metadata and controls
45 lines (35 loc) · 1.28 KB
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
from os import system
from time import sleep
from sys import platform, stdout
from colorama import Fore, Style
def clear():
if platform == "linux" or platform == "linux2":
system('clear')
elif platform == "darwin":
system('clear')
elif platform == "win32":
system('cls')
def maintitle():
stdout.write(
f"\x1b]2;Jag's Football Predictor\x07"
)
def selection():
clear()
maintitle()
print(Fore.YELLOW + Style.BRIGHT + "\n[0] Exit" + Style.RESET_ALL)
print(Fore.WHITE + "\nMODULES\n" + Style.RESET_ALL)
print(Fore.GREEN + Style.BRIGHT + "[1] Scrape All Datasets" + Style.RESET_ALL)
print(Fore.GREEN + Style.BRIGHT + "[2] Scrape Current Season Dataset" + Style.RESET_ALL)
print(Fore.GREEN + Style.BRIGHT + "[3] Make a Prediction" + Style.RESET_ALL)
print(Fore.GREEN + Style.BRIGHT + "[4] View Previous Prediction" + Style.RESET_ALL)
print("")
module = input("INPUT\n")
return module
def log(message: str):
print(Fore.YELLOW + f"{message}\n"+Style.RESET_ALL)
def log_input(message: str):
x = input(Fore.YELLOW + f"{message}\n"+Style.RESET_ALL)
return x
def log_invalid_selection():
print(Fore.RED + "\nInvalid Selection\n"+Style.RESET_ALL)
sleep(0.15)