-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun.py
35 lines (25 loc) · 920 Bytes
/
run.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
import time
from main_module import m_welcome
from requests import get
from termcolor import colored
import threading
from discord_integration import start_rpc, set_running
from api_connector import get_skip_times
VERSION = "v2.10"
def check_update() -> None:
response = get(
"https://api.github.com/repos/TowarzyszFatCat/doccli/releases/latest"
)
if response.json()["name"] != VERSION:
print(colored("Wersja programu:", "white"), colored(VERSION, "red"))
print(colored('Najnowsza wersja:', "white"), colored(f"{response.json()['name']}", "green"))
print('')
print(colored("Dostępna jest nowa wersja doccli!", "white"))
print('')
input(colored("Naciśnij enter by pominąć...", "yellow"))
if __name__ == "__main__":
check_update()
set_running(True)
thread = threading.Thread(target=start_rpc)
thread.start()
m_welcome()