# -*- coding: utf-8 -*-
import logging
from os.path import dirname, join
import re
import yaml
import os

logger = logging.getLogger(__name__)

with open(os.environ['SECRET_PATH']) as fd:
    TOKEN = yaml.load(fd)['Token']
TABLES_YT_PATH = '//home/vipplanners/users/vbatraev/BTZ/Checked/'
STAFF_URL = 'http://staff-api.yandex-team.ru/v3/'

with open(join(dirname(__file__), 'yql_query')) as fd:
    YQL_QUERY = fd.read().decode('utf8')

PATTERN = re.compile(
    (r'####\n'
     r'task\n'
     r'####\n'
     r'(?P<params>.*)\n'
     r'####\n'
     r'(?P<categories>.*)\n'
     r'####\n'
     r'(?P<competitors>.*)\n'
     r'####'),
    flags=re.DOTALL)
