Add a systray based GUI o:

This commit is contained in:
Kat Inskip 2023-09-09 13:27:06 -07:00
parent d894d7176c
commit 96f1ee3583
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
8 changed files with 198 additions and 12 deletions

View file

@ -6,9 +6,9 @@ Print a key-value pair with a key and value coloured differently.
:param key: The key to print
:param value: The value to print
:param newline: Whether to print a newline after the value
:param level: The logging level to print at
:returns: None
"""
def kv_print(key: str, value: str, newline: bool = False) -> None:
logging.info(f"{key}: {value}")
print(termcolor.colored(key, "cyan") + ": " + termcolor.colored(value, "white"), end="\n" if newline else " ")
def kv_print(key: str, value: str, level: str = "INFO") -> None:
logger = getattr(logging, level.lower())
logger(termcolor.colored(key, "cyan") + ": " + termcolor.colored(value, "white"))