Files
redmine_tracker/config/__init__.py
2025-05-19 14:23:07 +03:00

32 lines
884 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import argparse
from pydantic_settings import BaseSettings
from .clockify import ClockifyConfig # noqa: F401
from .redmine import RedmineConfig # noqa: F401
class Config(BaseSettings):
CLOCKIFY_TOKEN: str
REDMINE_TOKEN: str
CLOCKIFY_USER_ID: str
CLOCKIFY_WORKSPACE_ID: str
DATETIME_FORMAT: str = "%Y-%m-%dT%H:%M:%SZ"
def configure_argument_parser():
parser = argparse.ArgumentParser(description='Трекер трудочасов с Clockify в Redmine')
parser.add_argument(
'-s',
'--start',
help='Дата начала парсинга активностей в формате гггг-мм-дд'
)
parser.add_argument(
'-e',
'--end',
help='Дата окончания парсинга активностей в формате гггг-мм-дд'
)
return parser
config = Config()