v0.2.0 — multi-format text extraction
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 amimetype → extractorregistry anddispatch()(filename-extension fallback). Each extractor is a purebytes → textfunction. - OOXML (docx/pptx/xlsx) and ODF (odt/ods/odp) parsed with the standard library (
zipfile+xml.etree); legacy.docviaolefile(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 clearExtractErrormessage — 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_textresult shape:pages_processed/pages_total→unit(pages/slides/sheets/paragraphs) +units_processed/units_total.- Size-limit config renamed
pdf_max_mb→extract_max_mb(DSPACE_EXTRACT_MAX_MB/--extract-max-mb). The oldDSPACE_PDF_MAX_MB/--pdf-max-mbstill work as aliases.
Full design and rationale: docs/superpowers/specs/2026-07-23-multiformat-text-extraction-design.md.