Skip to content

fix(cli): register MarkItDown engine in the CLI router - #13

Merged
Mihailorama merged 1 commit into
mainfrom
claude/markitdown-integration-7ch7n7
Jul 5, 2026
Merged

fix(cli): register MarkItDown engine in the CLI router#13
Mihailorama merged 1 commit into
mainfrom
claude/markitdown-integration-7ch7n7

Conversation

@Mihailorama

Copy link
Copy Markdown
Owner

Summary

Completes the MarkItDown integration started in #8. The adapter, router priorities, pyproject.toml extra, benchmark harness, README, and tests were all in place — but _build_router() in docfold/cli.py never registered the engine, so:

  • docfold engines did not list markitdown
  • docfold convert <file> -e markitdown failed with Unknown engine 'markitdown'

Changes

  • src/docfold/cli.py — register MarkItDownEngine in _build_router() using the same try/except pattern as the other 20 engines.
  • tests/test_cli.py — new test test_registers_markitdown (written first, confirmed failing, then fixed — per the TDD golden rule).
  • docs/tasks/MARKITDOWN_ENGINE.md — added the CLI to scope, checked off the completed test plan, marked the task DONE.
  • CHANGELOG.md — added a Fixed entry under [Unreleased].

Testing

  • pytest tests/ — 332 passed, 3 skipped.
  • ruff check — clean on changed files.
  • Manual E2E with real markitdown 0.1.6 installed: docfold engines now lists markitdown as available, and docfold convert sample.html -e markitdown / docfold convert sample.csv -e markitdown produce correct Markdown (headings, bold, tables).

🤖 Generated with Claude Code

https://claude.ai/code/session_01P8piXZeKezQY5xLSooAh63


Generated by Claude Code

The MarkItDown integration (PR #8) wired the adapter into the engine
router priorities, pyproject extras, benchmark harness, and README, but
_build_router() in docfold.cli never registered it. As a result
'docfold engines' did not list markitdown and
'docfold convert -e markitdown' failed with "Unknown engine".

Register MarkItDownEngine like the other adapters, add a CLI test, and
mark the MARKITDOWN_ENGINE task as done.

E2E verified with markitdown 0.1.6: 'docfold engines' lists it and
'docfold convert -e markitdown' converts HTML and CSV to Markdown.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8piXZeKezQY5xLSooAh63
@Mihailorama
Mihailorama marked this pull request as ready for review July 5, 2026 22:51
@Mihailorama
Mihailorama merged commit 6501337 into main Jul 5, 2026
10 checks passed
@Mihailorama
Mihailorama deleted the claude/markitdown-integration-7ch7n7 branch July 5, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants