cv/main.py
Konstantin Fickel a1a8ddf893
All checks were successful
Continuous Integration / Build Package (push) Successful in 1m31s
Continuous Integration / Lint, Check & Test (push) Successful in 1m36s
build: switch from devenv to nix flakes with uv2nix
- Replace devenv setup with pure nix flakes using uv2nix, pyproject-nix,
  pyproject-build-systems, and git-hooks.nix (adapted from hokusai)
- Add forgejo CI pipeline with lint/check/test and build jobs
- Wrap cv binary with LD_LIBRARY_PATH for weasyprint native dependencies
- Move basedpyright to dev dependency group, add pytest and ruff
- Fix package imports to use hatch source remapping (src/ layout)
- Update .envrc to use flake, expand .gitignore

BREAKING CHANGE: devenv is no longer used, run direnv allow to reload
2026-03-05 21:25:55 +01:00

23 lines
643 B
Python

from pathlib import Path
import typer
from cv_generator.generator import generate_pdf
app = typer.Typer()
@app.command()
def generate(
input_file: Path = typer.Argument(help="Markdown file with YAML frontmatter"), # pyright: ignore[reportCallInDefaultInitializer]
output_file: Path | None = typer.Option( # pyright: ignore[reportCallInDefaultInitializer]
None, "--output", "-o", help="Output PDF path"
),
) -> None:
"""Generate a PDF CV from a Markdown file with YAML frontmatter."""
result = generate_pdf(input_file, output_file)
typer.echo(f"Generated {result}")
if __name__ == "__main__":
app()