microsoft开源,解决各类文件转Markdown!
大模型最喜欢的Skills是Markdown格式文件、很多分享网站支持Markdown格式语法,例如GitHub、公众号、知乎、CSDN、简书等。
毫无疑问,Markdown已经是最流行的文本编辑排版格式。
microsoft开源的markitdown解决了常见文件转markdown的需求,117k stars,
markitdown目前支持以下格式文件转markdown:
PDF PowerPoint Word Excel Images (EXIF metadata and OCR) Audio (EXIF metadata and speech transcription) HTML Text-based formats (CSV, JSON, XML) ZIP files (iterates over contents) Youtube URLs EPubs ... and more!
一些第三方插件也支持markitdown
列出installed plugins。
markitdown --list-plugins
markitdown安装
git clone [email protected]:microsoft/markitdown.git
cd markitdown
pip install -e 'packages/markitdown[all]'
markitdown使用
# path-to-file.pdf转换为document.md
markitdown path-to-file.pdf -o document.md
参考:https://github.com/microsoft/markitdown