feat: Add support for legacy .doc file format#1624
Open
yuchengpersonal wants to merge 1 commit intomicrosoft:mainfrom
Open
feat: Add support for legacy .doc file format#1624yuchengpersonal wants to merge 1 commit intomicrosoft:mainfrom
yuchengpersonal wants to merge 1 commit intomicrosoft:mainfrom
Conversation
- Add DocConverter class to convert Word 97-2003 (.doc) files - Support both textract (Python) and antiword (system) backends - Register converter in MarkItDown class - Add [doc] optional dependency in pyproject.toml - Update README.md to document .doc support Fixes microsoft#23 Co-Authored-By: yuchengpersonal <yuchengpersonal@users.noreply.github.com>
|
@yuchengpersonal please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
C# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for converting legacy Microsoft Word (.doc) files (Word 97-2003 format) to Markdown, addressing Issue #23.
Changes
Usage
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: markitdown[doc] in /usr/local/lib/python3.11/dist-packages (0.1.5)
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.11/dist-packages (from markitdown[doc]) (4.14.3)
Requirement already satisfied: charset-normalizer in /usr/local/lib/python3.11/dist-packages (from markitdown[doc]) (3.4.6)
Requirement already satisfied: defusedxml in /usr/local/lib/python3.11/dist-packages (from markitdown[doc]) (0.7.1)
Requirement already satisfied: magika~=0.6.1 in /usr/local/lib/python3.11/dist-packages (from markitdown[doc]) (0.6.3)
Requirement already satisfied: markdownify in /usr/local/lib/python3.11/dist-packages (from markitdown[doc]) (1.2.2)
Requirement already satisfied: requests in /usr/local/lib/python3.11/dist-packages (from markitdown[doc]) (2.32.5)
Requirement already satisfied: click>=8.1.7 in /usr/local/lib/python3.11/dist-packages (from magika~=0.6.1->markitdown[doc]) (8.3.1)
Requirement already satisfied: onnxruntime>=1.17.0 in /usr/local/lib/python3.11/dist-packages (from magika~=0.6.1->markitdown[doc]) (1.24.4)
Requirement already satisfied: numpy>=1.24 in /usr/local/lib/python3.11/dist-packages (from magika~=0.6.1->markitdown[doc]) (2.4.3)
Requirement already satisfied: python-dotenv>=1.0.1 in /usr/local/lib/python3.11/dist-packages (from magika~=0.6.1->markitdown[doc]) (1.2.2)
Requirement already satisfied: soupsieve>=1.6.1 in /usr/local/lib/python3.11/dist-packages (from beautifulsoup4->markitdown[doc]) (2.8.3)
Requirement already satisfied: typing-extensions>=4.0.0 in /usr/local/lib/python3.11/dist-packages (from beautifulsoup4->markitdown[doc]) (4.15.0)
Requirement already satisfied: six<2,>=1.15 in /usr/local/lib/python3.11/dist-packages (from markdownify->markitdown[doc]) (1.17.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests->markitdown[doc]) (3.11)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests->markitdown[doc]) (2.6.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests->markitdown[doc]) (2026.2.25)
Requirement already satisfied: flatbuffers in /usr/local/lib/python3.11/dist-packages (from onnxruntime>=1.17.0->magika~=0.6.1->markitdown[doc]) (25.12.19)
Requirement already satisfied: packaging in /usr/local/lib/python3.11/dist-packages (from onnxruntime>=1.17.0->magika~=0.6.1->markitdown[doc]) (26.0)
Requirement already satisfied: protobuf in /usr/local/lib/python3.11/dist-packages (from onnxruntime>=1.17.0->magika~=0.6.1->markitdown[doc]) (7.34.0)
Requirement already satisfied: sympy in /usr/local/lib/python3.11/dist-packages (from onnxruntime>=1.17.0->magika~=0.6.1->markitdown[doc]) (1.14.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.11/dist-packages (from sympy->onnxruntime>=1.17.0->magika~=0.6.1->markitdown[doc]) (1.3.0)
Technical Details
Fixes #23