markitdown
markitdown copied to clipboard
feat: add DocConverter for legacy .doc files using unword parser
Closes #23 Closes #56 (Note: This PR includes both contributions to these issues as I forgot to open a new branch)
Summary
Issue 23 - Adds support for converting Microsoft Word .doc files (Word 97-2003 OLE format) to Markdown. Uses the unword library as parser backend to extract body text with heading levels, page breaks, and textbox contents.
Issue 56 - Extracts and saves images to disk when using pptx files, and are saved to the current
directory by default, or a custom directory via the output_dir kwarg.
Changes
1. .doc File Support
- Added
_doc_converter.pywith a newDocConverterclass - Registered
DocConverterinconverters/__init__.pyand_markitdown.py - Added
test.doctest file and test vector in_test_vectors.py
2. PPTX Image Extraction
- Made changes to
_pptx_converter.pyto save image blobs to disk using the correct file extension from the image content type. - Edited test vector for pptx converter in
_test_vectors.py
Testing
All local tests pass
@microsoft-github-policy-service agree