Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
n0vuh authored Aug 12, 2021
1 parent f3ed09c commit ce8ea07
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/utils/console.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import os
import ctypes

from colorama import Fore, Style
from datetime import datetime

def time_tag() -> str:
time = datetime.now().strftime("%H:%M")
tt = Style.BRIGHT + Fore.BLACK + f" [{time}] "
return tt

class tags:
default = time_tag() + f"{Fore.WHITE}[ {Fore.YELLOW}anti {Fore.WHITE}] "
error = time_tag() + f"{Fore.WHITE}[ {Fore.RED}ERR! {Fore.WHITE}] "
okay = time_tag() + f"{Fore.WHITE}[ {Fore.GREEN}OKAY {Fore.WHITE}] "

def clear():
"""Clears console/terminal"""
if "nt" in os.name:
os.system("cls")
else:
os.system("clear")

def title(t: str):
ctypes.windll.kernel32.SetConsoleTitleW(t)

0 comments on commit ce8ea07

Please sign in to comment.