微软在 GitHub 上开源了一个 Python 工具库 MarkItDown,MarkItDown提供的作用是:可将任意 Office 文件转换成 Markdown 格式。
这款工具支持的具体格式包括:
- PDF (.pdf)
- PowerPoint (.pptx)
- Word (.docx)
- Excel (.xlsx)
- Images (EXIF metadata, and OCR)
- Audio (EXIF metadata, and speech transcription)
- HTML (special handling of Wikipedia, etc.)
- Various other text-based formats (csv, json, xml, etc.)
- ZIP (Iterates over contents and converts each file)
MarkitDown 使用 MIT 协议,开发者甚至可以使用大模型来接入 MarkitDown 用来进行图片信息描述。
目前已经有开发者基于 MarkitDown 推出了网页版 Office 文件转 Markdown 服务。链接:msftmd.replit.app