jiavenzhong/dsh-tool-markitdown ↗★ 0
dsh-tool-markitdown
DSH plugin: convert user-sent non-text files (PDF/DOCX/XLSX/PPTX/HTML/CSV/EPUB/…) into LLM-friendly Markdown with Microsoft MarkItDown — composer file button + model-facing markitdown tool + send-time auto-convert.
AI Analysis
核心用途是实现非文本文件到 Markdown 的无缝转换。适合需要频繁向 AI 投喂 PDF、Office 文档等文件的用户。本地环境必须先安装 Python 库 markitdown。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jiavenzhong/dsh-tool-markitdownREADME
Read the full README ↗🚀 使用说明
1. 上传文件(最常用)
点输入框左侧 📄 → 选择文件 → 转换后的 Markdown 自动插入草稿(带 `` 注释头)→ 可编辑后发送。
2. 拖拽工作区文件
从右侧「文件」面板把文件拖进输入框(已有功能)→ 发送时插件自动把该路径行替换为转换后的 Markdown。
3. 对话中让模型转换
直接说:
把 docs/报告.docx 转成 markdown 分析一下
或把本地绝对路径 / http(s) 链接交给模型,模型会自动调用 markitdown 工具(工具描述要求"非文本文件先转换再阅读")。
4. 超长文档
内容超过上限(默认 120,000 字符)时自动截断,并在结尾给出:
模型再次调用 markitdown 并传入该 attachmentId 即可读取全文。
⚙️ 配置
位置:设置 > 插件配置 > markitdown
| 字段 | 默认值 | 说明 |
|---|---|---|
pythonCommand | python | MarkItDown 所在 Python 解释器;找不到时自动尝试 py -3 |
pythonModule | markitdown | MarkItDown CLI 模块名 |
maxInputBytes | 52428800(50 MB) | 上传 / 下载文件字节上限 |
maxOutputChars | 120000 | 单次返回 Markdown 字符上限(超出截断,可凭 attachmentId 取全文) |
timeoutMs | 120000 | 单次转换超时(毫秒) |
autoConvertOnSend | true | 发送时是否自动转换草稿中的文件路径行 |