2026-02-13 19:06:09 +01:00
|
|
|
"""
|
|
|
|
|
Built-in extractor registration.
|
|
|
|
|
|
|
|
|
|
Importing this module registers all built-in extractors with the global registry.
|
2026-02-13 20:48:47 +01:00
|
|
|
|
2026-02-13 20:52:07 +01:00
|
|
|
Markitdown is registered last and unconditionally — it overrides the specialized
|
|
|
|
|
extractors for overlapping extensions (.pdf, .html, .htm) and adds new types.
|
|
|
|
|
If markitdown is not installed, it gives a clear install hint at extraction time
|
|
|
|
|
(same pattern as PdfExtractor / HtmlExtractor).
|
2026-02-13 19:06:09 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from markitect.proxy.registry import registry
|
|
|
|
|
from markitect.proxy.extractors.pdf import PdfExtractor
|
|
|
|
|
from markitect.proxy.extractors.html import HtmlExtractor
|
|
|
|
|
from markitect.proxy.extractors.markdown import MarkdownNormalizer
|
2026-02-13 20:52:07 +01:00
|
|
|
from markitect.proxy.extractors.markitdown_ext import MarkitdownExtractor
|
2026-02-13 19:06:09 +01:00
|
|
|
|
2026-02-13 20:52:07 +01:00
|
|
|
# 1. Specialized extractors (baseline — available as explicit fallbacks)
|
2026-02-13 19:06:09 +01:00
|
|
|
registry.register(PdfExtractor())
|
|
|
|
|
registry.register(HtmlExtractor())
|
|
|
|
|
registry.register(MarkdownNormalizer())
|
2026-02-13 20:48:47 +01:00
|
|
|
|
|
|
|
|
# 2. Markitdown as default backend — overrides .pdf, .html, .htm and adds
|
|
|
|
|
# new types (.docx, .pptx, .xlsx, .xls, .csv, .json, .xml)
|
2026-02-13 20:52:07 +01:00
|
|
|
registry.register(MarkitdownExtractor())
|