[AI]
Поддержка тем
This commit is contained in:
@@ -9,7 +9,13 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def process_document(input_dir: Path, output_dir: Path, style_config_path: Path, template_path: Optional[Path] = None):
|
||||
def process_document(input_dir: Path, output_dir: Path, style_config_path: Path, template_path: Optional[Path] = None, theme_name: Optional[str] = None):
|
||||
if theme_name:
|
||||
theme_path = Path("resources/themes") / f"{theme_name}.yaml"
|
||||
if theme_path.exists():
|
||||
style_config_path = theme_path
|
||||
else:
|
||||
logger.warning(f"Тема {theme_name} не найдена, используем стандартный стиль")
|
||||
for doc_dir in input_dir.iterdir():
|
||||
if not doc_dir.is_dir():
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user