1.3 KiB
1.3 KiB
Step 0: cli-entrypoint-options
Read First
- /AGENTS.md
- /PLAN.md
- /PROGRESS.md
- /docs/HARNESS.md
- /docs/IMPLEMENTATION_PLAN.md
- /docs/ARCHITECTURE.md
- /phases/1-core-runtime-contracts/index.json
- /phases/5-markdown-rendering-assets/index.json
Task
Implement the python -m pdftomd CLI entrypoint and option parsing over the existing library API.
Expose input PDF, output directory, formula parser mode, Nougat command, runtime/device, chunk size, logging, and resume options.
Sprint Contract
- Done means: CLI options map into typed conversion options and can run against a mocked pipeline in tests.
- Hard thresholds: CLI does not duplicate conversion logic; defaults match docs; explicit
cudaandautomodes are represented. - Files owned:
src/pdftomd/__main__.py, CLI modules/tests,README.mdif command docs change,PROGRESS.md, phase index. - Dependencies: Core contracts and renderer pipeline.
Acceptance Criteria
python scripts\validate_workspace.py
.\venv\python.exe -m pytest tests
Verification
- Run the acceptance commands.
- Confirm CLI help text shows documented options.
- Update
PROGRESS.mdand this phase index.
Do Not
- Do not put parser logic inside CLI parsing code.
- Do not implement PyQt UI.
- Do not silently CPU fallback for explicit CUDA mode.