git clone https://github.com/Benny-Lewis/oh-hi-markdown.git
cd oh-hi-markdown
pip install -e ".[dev]"# Unit tests (all HTTP is mocked, no network required)
python -m pytest --tb=short -q
# Lint
ruff check && ruff format --check- Formatted and linted with Ruff
- Line length: 100 characters
- Target: Python 3.10+
src/oh_hi_markdown/
├── cli.py # Argument parsing, URL validation, entry point
├── jina.py # Jina Reader API client (ContentProvider implementation)
├── parser.py # Markdown image reference extraction
├── images.py # Image downloading, retry, filename resolution
├── writer.py # Front matter generation and article.md assembly
├── publisher.py # Atomic publish (temp dir → final output)
├── pipeline.py # Orchestrates the full fetch → publish flow
├── log.py # Logging setup, redaction, console output
├── config.py # Constants and version
└── exceptions.py # Custom exception types
The tool uses a pluggable content provider interface. JinaProvider is the v1 implementation, but the image downloading, link rewriting, and file output logic contain no Jina-specific code. See DESIGN.md for details.
- All HTTP interactions are mocked via the
responseslibrary - Filesystem tests use pytest's
tmp_pathfixture - Test IDs map to acceptance criteria in
REQUIREMENTS.md(T-01 through T-28, plus additional edge cases) - Integration tests (I-01 through I-05) are run manually against real URLs — see
docs/integration-test-results.md
- Fork the repo and create a branch from
main - Make your changes
- Ensure all tests pass and lint is clean
- Open a pull request with a clear description of what and why