16 lines
557 B
Python
16 lines
557 B
Python
|
|
import typer
|
|||
|
|
from pathlib import Path
|
|||
|
|
from .core.converter import process_document
|
|||
|
|
|
|||
|
|
app = typer.Typer()
|
|||
|
|
|
|||
|
|
@app.command()
|
|||
|
|
def convert(
|
|||
|
|
input_dir: Path = typer.Option(..., "--input", "-i", help="Папка с исходниками"),
|
|||
|
|
output_dir: Path = typer.Option(..., "--output", "-o", help="Папка для результата"),
|
|||
|
|
style_config: Path = typer.Option("resources/style_config.yaml", "--style", "-s", help="Файл стилей")
|
|||
|
|
):
|
|||
|
|
process_document(input_dir, output_dir, style_config)
|
|||
|
|
|
|||
|
|
if __name__ == "__main__":
|
|||
|
|
app()
|