beancookie/dsh-plugin-anydoc
DSH插件:基于@firecrawl/anydoc将Word、PPT、Excel、PDF、EPUB、CSV等文档转换为GitHub风格Markdown
项目介绍Project Overview
dsh-plugin-anydoc 是一款 DeepSeek Harness 插件,将 @firecrawl/anydoc 集成并注册为 Agent 可调用的 anydoc 工具。它借助 Rust 原生绑定在 libuv 线程池中执行转换,将 Word、PowerPoint、Excel、OpenDocument、RTF、EPUB、CSV 和 PDF 等多种文档格式转为 GitHub-Flavored Markdown,无外部进程与 Python 依赖,不阻塞事件循环。适用于需要让 Agent 直接读取并转换本地办公文档或电子书内容的场景。需注意:不支持 HTML、JSON、XML、图片与音频,且需通过 dsh plugin 命令安装。
dsh-plugin-anydoc is a DeepSeek Harness plugin that integrates @firecrawl/anydoc and registers it as the anydoc tool for Agents. It runs conversions in a libuv thread pool via Rust native bindings, converting Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF files into GitHub-Flavored Markdown without external processes or Python dependencies, keeping the event loop unblocked. Use it when an Agent must read and convert local office documents or ebooks into Markdown. Caveat: HTML, JSON, XML, images, and audio are not supported, and installation requires the dsh plugin command.
请帮我了解并安装插件:【dsh-plugin-anydoc】【https://github.com/beancookie/dsh-plugin-anydoc】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:beancookie/dsh-plugin-anydoc
把 beancookie/dsh-plugin-anydoc 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-plugin-anydoc
一个 DeepSeek Harness (DSH) 插件,将 @firecrawl/anydoc 作为 anydoc 工具注册给 Agent,把多种文档格式转换为 GitHub-Flavored Markdown。
基于 @firecrawl/anydoc(Rust 原生绑定,napi-rs),在 libuv 线程池中执行,不阻塞事件循环,无需任何外部进程或 Python 环境。
支持的格式
| 类别 | 扩展名 |
|---|---|
| Word | .doc .docx .docm |
| PowerPoint | .ppt .pps .pot .pptx .pptm .ppsx .ppsm |
| Excel | .xls .xlsx .xlsm .xlsb |
| OpenDocument | .odt .ods .odp |
| Rich Text | .rtf |
| EPUB | .epub |
| CSV | .csv |
.pdf |
不支持 HTML、JSON、XML、图片与音频。
安装
dsh plugin --profile web add github:beancookie/dsh-plugin-anydoc
安装完成后直接启动:
dsh web
卸载
dsh plugin --profile web remove dsh-plugin-anydoc
使用
启动 DSH Web 后,向 Agent 发送类似指令:
请将 /path/to/report.docx 转换为 Markdown
Agent 会调用 anydoc 工具,返回转换后的 Markdown 内容。
工具参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
filePath |
string | 是 | 要转换文件的绝对或相对路径 |
format |
string | 否 | 显式指定格式(如 csv);缺省时根据文件内容自动检测 |
outputFilePath |
string | 否 | 将结果写入该文件并返回摘要,而非返回完整 Markdown |
开发
# 安装依赖
pnpm install
# 编译 TypeScript 到 lib/
pnpm build
本地加载(--patch 开发模式):
pnpm dsh web --patch "/path/to/dsh-plugin-anydoc/dev.cordis.patch.yml"
社区
本项目积极支持并感谢 LINUX DO 社区——一个面向技术爱好者的友好交流空间。
许可
MIT
nexu-io/open-design
ruvnet/ruflo
amruthpillai/reactive-resume
esengine/DeepSeek-Reasonix
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/distilly
titanwings/colleague-skill