Skip to content

v0.2.0 — multi-format text extraction

Choose a tag to compare

@mpasternak mpasternak released this 24 Jul 16:54
· 24 commits to main since this release

Multi-format text extraction

get_bitstream_text now extracts text from eight formats instead of PDF only: pdf, docx, legacy doc, odt, ods, odp, pptx, xlsx. Nothing to opt into — uvx dspace-mcp reads them all.

Highlights

  • New dspace_mcp/extractors/ package with a mimetype → extractor registry and dispatch() (filename-extension fallback). Each extractor is a pure bytes → text function.
  • OOXML (docx/pptx/xlsx) and ODF (odt/ods/odp) parsed with the standard library (zipfile + xml.etree); legacy .doc via olefile (best-effort).
  • Security: all XML goes through defusedxml (XXE / billion-laughs safe) and every ZIP member read is size-guarded (zip-bomb). Any extraction failure returns a clear ExtractError message — never a raw traceback. Read-only, GET-only guarantee unchanged.

New dependencies

Only olefile>=0.47 and defusedxml>=0.7 — both small, pure-Python. No lxml/Pillow/python-docx/python-pptx.

Changes to be aware of

  • get_bitstream_text result shape: pages_processed/pages_totalunit (pages/slides/sheets/paragraphs) + units_processed/units_total.
  • Size-limit config renamed pdf_max_mbextract_max_mb (DSPACE_EXTRACT_MAX_MB / --extract-max-mb). The old DSPACE_PDF_MAX_MB / --pdf-max-mb still work as aliases.

Full design and rationale: docs/superpowers/specs/2026-07-23-multiformat-text-extraction-design.md.