import os
import sys

from tools.load_yozo import search_yozosoft

CONFIG = {'oss': {
    # 'endpoint': '172.10.3.36:9000',
    'endpoint': '10.18.5.29:9000',
    'access_key': 'miniominio',
    'secret_key': 'miniominio'
}}
SERVER_POINT = 'http://221.226.175.250:7215/'

TARGET_URL = 'http://221.226.175.250:7215'

def get_config(config_name):
    return CONFIG.get(config_name)


def is_frozen():
    return getattr(sys, 'frozen', False)

yozoc, yozoi, yozow = search_yozosoft()
file_type_map = {
    'docx': yozow,
    'doc': yozow,
    'txt': yozow,
    'ppt': yozoi,
    'pptx': yozoi,
    'csv': yozoc,
    'xlsx': yozoc,
    'xls': yozoc,
}

headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36',
    'content-type': 'text/plain;charset=UTF-8'
}
base_path = os.path.dirname(os.path.dirname(sys.executable if getattr(sys, 'frozen', False) else __file__))
