Skip to content

Image OCR ingestion, import/share integration, license, and transitive-dependency policy - #11

Merged
etherlink-intern merged 2 commits into
mainfrom
codex/identify-acceptable-document-types-for-ingestion-vs1jx6
Jun 2, 2026
Merged

etherlink-intern merged 2 commits into
mainfrom
codex/identify-acceptable-document-types-for-ingestion-vs1jx6

Conversation

@etherlink-intern

Copy link
Copy Markdown
Owner

Motivation

  • Make images first-class inputs by adding on-device OCR so apps can import photos and scans and convert them to Markdown on Apple platforms.
  • Provide clear integration guidance for common import surfaces (document picker, PhotosPicker, and Share Sheet) so apps can wire a single conversion core into multiple UI flows.
  • Make dependency/acknowledgement policy rigorous by requiring transitive SwiftPM dependencies to be recorded for future FOSS backends (e.g., CoreXLSX → XMLCoder/ZIPFoundation).

Description

  • Added image document formats to DocumentFormat (png, jpeg, heic, tiff, gif) and an imageFormats helper, extended content-type and filename inference for images.
  • Implemented ImageOCRConverter that uses Vision/CoreGraphics/ImageIO under conditional compilation to run OCR, normalize recognized lines, and return MarkdownDocument, and registered it in MarkItDown.defaultConverters.
  • Added comprehensive docs and examples: Docs/ImportButtonIntegration.md (file importer, PhotosPicker, Share Extension, importer helpers) and updated Docs/NativeConverterBackends.md and README.md to document planned backends, platform availability, and the new transitive-license acknowledgement policy (including adding XMLCoder to the acknowledgement table).
  • Added repository LICENSE (MIT), added tests for format inference, platform fallback behavior, and conditional Vision OCR (rendered OCR test images when Vision is available), and updated the test suite to exercise the new image paths.

Testing

  • Ran swift test, which completed successfully (unit tests passed, Vision-based tests run conditionally).
  • Ran the CLI smoke tests via Scripts/smoke-test.sh, which completed successfully.
  • Ran repository checks via git diff --check (no issues found).

Codex Task

@etherlink-intern
etherlink-intern marked this pull request as ready for review June 2, 2026 11:28
@etherlink-intern
etherlink-intern merged commit 1917841 into main Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant