|
|
|
@ -25,16 +25,32 @@ from rich.console import Console
|
|
|
|
|
from rich.progress import track
|
|
|
|
|
import time
|
|
|
|
|
import os
|
|
|
|
|
import platformdirs
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
# Const sections.
|
|
|
|
|
|
|
|
|
|
# Console initialising
|
|
|
|
|
console = Console()
|
|
|
|
|
|
|
|
|
|
APPNAME = "anitube-simple-notification"
|
|
|
|
|
APPAUTHOR = "KKlochko"
|
|
|
|
|
CONFIG_NAME = "config.toml"
|
|
|
|
|
BASE_DIR = os.path.dirname(__file__)
|
|
|
|
|
DB_PATH = os.path.join(BASE_DIR, 'user.db')
|
|
|
|
|
POSTERS_PATH = os.path.join(BASE_DIR, 'posters')
|
|
|
|
|
CONFIG_PATH = os.path.join(BASE_DIR, 'config.toml')
|
|
|
|
|
DATA_DIR = platformdirs.user_data_dir(APPNAME, APPAUTHOR)
|
|
|
|
|
|
|
|
|
|
DB_PATH = os.path.join(DATA_DIR, 'user.db')
|
|
|
|
|
POSTERS_PATH = os.path.join(DATA_DIR, 'posters')
|
|
|
|
|
|
|
|
|
|
CONFIG_PATH = platformdirs.user_config_path(APPNAME, APPAUTHOR, CONFIG_NAME)
|
|
|
|
|
|
|
|
|
|
# check for existing of dirs
|
|
|
|
|
if not os.path.exists(DATA_DIR):
|
|
|
|
|
os.makedirs(DATA_DIR)
|
|
|
|
|
|
|
|
|
|
if not os.path.exists(CONFIG_PATH):
|
|
|
|
|
os.makedirs(CONFIG_PATH)
|
|
|
|
|
|
|
|
|
|
config = Config.get_config(CONFIG_PATH, console)
|
|
|
|
|
|
|
|
|
|
# Here you can change testing headers to yours.
|
|
|
|
|