npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-office-extractor

v0.5.0

Published

Office (docx/xlsx) text / table / metadata extraction CLI and library for DeepSeek Harness (DSH) agents, plus a bundled DSH skill.

Readme

dsh-office-extractor

为 DeepSeek Harness (DSH) 代理准备的 Office 文档解析包(阶段一:docx + xlsx): 提供 dsh-office 命令行工具与 Node.js API,支持全文、表格、元数据提取与关键词搜索。

不修改 DSH 任何核心代码 —— 以「独立 npm 包 + 一份 DSH Skill 指令」的插件形式接入。

功能

| 能力 | CLI | API | | --- | --- | --- | | 元信息(类型/页数/sheet 数/标题/作者…) | dsh-office info | officeInfo() | | 全文 | dsh-office text | extractText() | | 分页/sheet 分隔 | dsh-office pages | extractText() | | 表格(Markdown/CSV/JSON) | dsh-office tables | extractTables() | | 关键词搜索(页码 + 片段) | dsh-office search | searchText() |

  • --pages:xlsx 工作表索引(1-based);docx 忽略。
  • 加密 xlsx:--password <密码>。

格式映射

  • docx:整篇视为 1 页;meta 含 core 文档属性;表格从文档 HTML 中提取。
  • xlsx:每工作表为 1 页(即一张表,首行表头);meta 含工作表名与工作簿属性。

安装 CLI

npm install -g dsh-office-extractor
dsh-office --help

安装 DSH Skill

# 项目级(写入 <项目>/.dsh/skills/office-extractor/SKILL.md)
node scripts/install-skill.mjs --project <项目目录>
# 用户级
node scripts/install-skill.mjs --user

安装后新建 DSH 会话即被发现。

使用

dsh-office info report.docx
dsh-office text ledger.xlsx --pages 1-2
dsh-office tables ledger.xlsx --format csv
dsh-office search report.docx "conclusion"

安全说明

解析基于 mammoth(docx)、xlsx(SheetJS)与 cheerio/jszip。npm 官方发布的 [email protected] 存在已知安全提示(原型污染/ReDoS),对本地可信任文件解析可接受; 如需处理不可信来源,请升级到 SheetJS 官方 CDN 维护版或改用 exceljs。

测试

npm run build
npm run gen-sample   # 生成 test/sample.docx 与 test/sample.xlsx
npm run smoke        # 冒烟测试(23 项断言)

发布

仓库附带 .github/workflows/publish.yml:推送 v* tag 触发 CI(npm ci → build → smoke → npm publish --access public)。认证用仓库 Secret NPM_TOKEN(npm 自动化 token,绝不写入提交)。