This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
minibook is a Python CLI tool that creates responsive HTML pages from a list of links using Jinja2 templates and Tailwind CSS. It's published on PyPI and available as a GitHub Action.
make install # Create venv and install all dependencies (uses uv)
make test # Run pytest with coverage reports
make fmt # Run pre-commit hooks (ruff linting + formatting)
make deptry # Check dependency usage.venv/bin/python -m pytest tests/test_minibook.py -v
.venv/bin/python -m pytest tests/test_minibook.py::test_function_name -vminibook --title "Title" --output "output-dir" --links '{"Name": "https://url.com"}'
minibook --validate-links --links '...' # Validate URLs before generatingPackage structure: src/minibook/
main.py- Core module containing CLI app (Typer), HTML generation, JSON parsing, and link validationtemplates/- Jinja2 templates (html.j2for full template,bare.j2for minimal)
Entry point: minibook = "minibook.main:app"
Key functions in main.py:
generate_html()- Main HTML generation using Jinja2parse_links_from_json()- Flexible JSON parsing (supports dict, list of objects, list of arrays)validate_url()/validate_link_list()- HTTP link validation with progress bar
- Linter/Formatter: Ruff (line-length 120, target Python 3.11)
- Rules: D (pydocstyle), E, F, I (isort), N, W, UP
- Docstrings: Google style convention
- Quote style: Double quotes
- Framework: pytest
- Coverage reports generated in
_tests/html-coverage/ - Tests live in
tests/directory
- Package manager: uv (Astral's Python package manager)
- Build backend: Hatchling
- Python versions: 3.11, 3.12, 3.13, 3.14
- CI: GitHub Actions workflows in
.github/workflows/ - Template framework: Uses jebel-quant/rhiza template (
.rhiza/directory)