Files
PDFToMD/phases/6-cli-runtime-resume/step0.md
T
김경종 7e985ae94a add files
2026-04-30 17:05:19 +09:00

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 cuda and auto modes are represented.
  • Files owned: src/pdftomd/__main__.py, CLI modules/tests, README.md if 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

  1. Run the acceptance commands.
  2. Confirm CLI help text shows documented options.
  3. Update PROGRESS.md and 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.