SuperAPI AI 工具集

markdown-converter

前端与建站

查看项目

更新于 10-15 21:11

技能介绍

用途:将多种文档与文件转换为 Markdown,适合把资料整理为可编辑的纯文本格式。

主要能力:支持文档类(PDF、Word .docx、PowerPoint .pptx、Excel .xlsx/.xls)、网页与数据类(HTML、CSV、JSON、XML)、媒体类(图片带 EXIF 与 OCR、音频带 EXIF 与转录),以及 ZIP(遍历内容)、YouTube URL、EPub。输出会保留文档结构,如标题、表格、列表和链接。

使用方式:通过 uvx 运行,无需预先安装。基本用法为 uvx markitdown input.pdf;保存到文件可加 -o,例如 uvx markitdown input.pdf -o output.md 或 uvx markitdown input.docx > output.md;也可从标准输入读取,如 cat input.pdf | uvx markitdown。

常用选项:-o 指定输出文件;-x 提示扩展名(用于标准输入);-m 提示 MIME 类型;-c 提示字符集(如 UTF-8);-d 使用 Azure Document Intelligence;-e 指定 Document Intelligence 端点;--use-plugins 启用第三方插件;--list-plugins 查看已安装插件。

示例:uvx markitdown report.docx -o report.md;uvx markitdown data.xlsx > data.md;uvx markitdown slides.pptx -o slides.md;cat document | uvx markitdown -x .pdf > output.md;uvx markitdown scan.pdf -d -e "https://your-resource.cognitiveservices.azure.com/"。

限制与注意事项:首次运行会缓存依赖,之后运行更快;对提取效果较差的复杂 PDF,可配合 -d 与 Azure Document Intelligence 使用。其他收费、平台支持等信息暂未提供。