Files
appointment_tool/definitions.py
T
2022-06-02 17:59:12 +02:00

22 lines
624 B
Python

import configparser
import getpass
import os
from pathlib import Path
from db.local_db_manager import LocalDbManager
home = str(Path.home())
config = configparser.ConfigParser()
print("home path: " + home)
# check the config file exsistence
config_file_path = home + "/config.ini"
config.read(config_file_path)
CONTACT_LIST_FILE = config['DEFAULT']['contact_list_file']
FIREBASE_CONFIG_FILE = config['DEFAULT']['firebase_config_file']
LOGS_DIR = config['DEFAULT']['LOGS_DIR']
username = getpass.getuser()
LOG_SOURCE = username
local_db_manager = LocalDbManager(home)
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))