DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-plugin-office-markdown

Z

dsh-plugin-office-markdown

Manifest valid★ 1

Convert Office/PDF to Markdown before reading — one path replaces the entire document — a token-saving DSH bundle plugin. 0 npm dependencies, all conversion happens locally, outputs are yours, uninstalling automatically cleans up the Python environment. Convert Office/PDF to Markdown before reading in DeepSeek Harness — one path instead of the whole document.

UI (client)hasBundlePatch

dsh-plugin-office-markdown

在 DeepSeek Harness 读取 Office / PDF 之前,先把它们转成 Markdown ——
进入模型上下文的是一个文件路径,而不是整份文件的原始内容。

中文 | English

release license node npm dependencies

安装 | 使用 | 转换器 | 文档 | 更新日志


转换在本机完成,不联网(可选的 MarkItDown 首次下载除外)、不修改原文件、 不消耗 API 额度,插件本身没有任何 npm 依赖。

安装

在 DSH 的 设置 → 插件 → 安装 里填一行,回车,然后重启 DSH:

github:Z8906/dsh-plugin-office-markdown

想锁定版本就在末尾加 tag:github:Z8906/dsh-plugin-office-markdown#<tag>, <tag> 形如 v1.2.1(见 Releases)。 目标机器没有 git 的话,可以用 Releases 里的 .tgz,在安装框里填它的绝对路径。 四种安装方式、手工装法与升级步骤见 安装文档。

升级不要走「卸载 → 重新安装」。 本插件在真正被卸载时会清理它自己登记过的 Python 包 (见 卸载文档),那条路的结果是「插件更新了、Python 环境却没了」。 用 pnpm update,或者直接在安装框里再 add 一次同一个 git 地址。

怎么用

装好之后不需要记命令,直接说「读取并总结这个 xlsx」即可 —— 插件注册的技能会让模型先调用转换工具:

read_office_as_markdown({ path: "报表.xlsx" })

返回值里有转换后 .md 的路径、体积、行数,以及一份结构索引(章节 / 工作表 / 幻灯片的标题与大致行号), 并给出读取建议:先读前 200 行看结构,再用 grep 在同一个 .md 里定位。 产物本身不会被裁剪 —— 交给模型的是一个完整的 Markdown 文件。

工具的其他用法:批量(paths,或把目录交给 path)、只要结构索引(action: "outline", 不触发转换)、清理同一源文件的旧产物(action: "clean",默认先干跑)、查看当前转换器 (action: "status")。全部参数见 使用文档。

转换器

按顺序探测,第一个可用的胜出。下表对照 lib/convert.js:

顺序转换器保真度需要
1uvx markitdown(临时运行)高uv + 网络(首次)
2本机 markitdown 命令高已安装 markitdown
3python -m markitdown高Python + markitdown
4插件内置 Python 兜底(lib/fallback.py)有限任意 Python 3,可选库能提升效果
5插件内置 Node 兜底(lib/fallback-node.js)有限无

第 5 级不需要 Python、也不需要网络:它用 Node 内置的 zlib 直接解析 OOXML (.docx / .xlsx / .pptx 本身就是 zip + xml)。支持 .docx .docm .xlsx .xlsm .pptx .pptm; .pdf 与旧版二进制格式(.doc .xls .ppt)需要 MarkItDown 或第 4 级。

每份产物的第一行记录它是谁转的;命中缓存时插件从这一行读回真实的转换器与保真度, 而不是无条件声称「高保真」:

<!-- dsh-office-markdown converter=python-module fidelity=high at=<时间> srcbytes=<字节数> srchash=<哈希> -->

想要高保真:打开 设置 → Office 转换,点「一键配置 MarkItDown 环境」。 安装脚本不会替你装任何 Python 包,装到哪个解释器由你在页面上选。 细节见 转换器文档。

设置页

设置 → Office 转换 提供:当前转换器、本机 Python 环境探测、一键配置 / 卸载 MarkItDown、 插件登记的环境记录、以及「试转一个文件」(不进模型、不走缓存,直接在本机跑一遍转换链看结果)。

页面上的按钮走插件自己的 HTTP 路由 /office-markdown/api/*,路由清单见 使用文档。

卸载

在 设置 → 插件 里点卸载即可。插件会先确认自己真的被移除(而不是被禁用 / 关闭 / 重启), 再派一个脱离宿主的看门狗进程,把它登记过的 Python 包 pip uninstall 掉。

禁用、关闭、重启都不会触发清理,也不会留下任何常驻进程。 清理范围严格限定在插件自己的环境记录里:DSH 运行时自带的包、被其它组件依赖的包、 以及你自己装的包,一个都不动。细节见 卸载文档。

依赖与兼容

  • Node ≥ 18,只用内置模块(fs / path / os / zlib / crypto / child_process / string_decoder), 0 个 npm 依赖,不需要 npm install。
  • Python 与 MarkItDown 全部可选:两者都没有时走第 5 级 Node 兜底。
  • 除宿主提供的 @deepseek-ai/dsh-tools(用于 defineTool)外,不 import 任何宿主包。
  • 只支持 DeepSeek Harness。profile 没有 webServer 服务时(例如 CLI profile), 设置页不会出现,工具与技能不受影响。

文档

文档内容
安装四种安装方式、手工安装、升级、验证
使用工具参数、技能、read 守卫、设置页、HTTP 路由
转换器转换器链、保真度、多个 Python 环境
配置配置项与默认值(对照 lib/index.js 的 DEFAULTS)
产物与文件.md 放在哪、插件会留下哪些文件
卸载启用 / 禁用 / 卸载与清理范围
故障排查常见现象与处理
开发包内文件、本地开发、发布
更新日志每个版本改了什么

关于本文档

本仓库的 README、docs/、CHANGELOG.md 以及各版本的 Release 说明,主要由 AI 生成 (DeepSeek Harness 里的编码 agent 撰写),由维护者审阅后发布。

其中配置项、HTTP 路由、转换器链、文件清单等内容都逐项对照过源码;但文档仍可能落后于实现, 或存在表述不准、细节缺失之处,请以代码为准。发现问题欢迎提 issue。

文档中不写没有实测依据的数字(例如「能省多少 token」「占用多少内存」)—— 这类断言缺少可复现的测量过程,因此不列出。

许可证

MIT © 2026 dsh-plugin-office-markdown contributors

Comments

Loading…

From the same category

awesome-dsh-plugin

by awesome-dsh-plugin

A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表

Development & Infrastructure

★ 18.3k

CC0-1.0

Python

Oct 10, 2026

Index only — not installable

by 0xsline

DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.

Development & Infrastructure

★ 1.2k

CC0-1.0

Python

Oct 10, 2026

Index only — not installable

by pax-beehive

Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub

Development & Infrastructure

★ 450

MIT

TypeScript

Oct 6, 2026

Index only — not installable

by xiajiajun516

DeepSeek Harness (DSH) backup & restore plugin — export, import, migrate and sync your complete DSH configuration, plugins, MCP servers, skills and workspace. One-click migration to another machine.

Development & InfrastructureManifest valid

★ 176

MIT

TypeScript

Oct 8, 2026

dsh plugin --profile web add dsh-config-manager

by yjh051108

推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。

Development & InfrastructureManifest valid

★ 164

TypeScript

Sep 18, 2026

dsh plugin --profile web add @dsh-external/dsh-super-injector

by jigjoy-ai

A CLI that turns a goal into a pull request - and a sandbox for testing concurrent AI coding agents on the Mozaik runtime.

Development & Infrastructure

★ 124

MIT

TypeScript

Oct 2, 2026

Index only — not installable