Invoice-Downloader
EthanYoQ
电子发票整理与报销准备工具:从邮箱批量收集 PDF/OFD/XML 发票,OCR 识别、分类归档并生成 Excel 汇总;提供 Windows/macOS 桌面版与 DSH 插件。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:arrongao/dsh-turn-ding
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
会话跑完时,在 Windows 任务栏的 DSH 图标上显示未读数字徽标,并播放一声提示音。
DSH 没有内置「会话完成提醒」:任务栏图标不会累计未读数,也没有完成提示音。dsh-turn-ding 补上这个缺口——每个会话正常结束时徽标 +1 并响一声,回到窗口自动清零,效果类似 Codex 的完成提醒。
99+)turn/end + completed)时计数;中断、报错、耗尽 token、子会话都不计| 系统 | Windows(win32,见 os 字段) |
| DSH | >=0.2.1-alpha.2 <0.4.0 |
| 运行时 | Node >= 20、PowerShell 5.1+(Windows 自带,无需 pwsh) |
DSH 侧栏「插件 → 安装第三方插件」输入包名:
dsh-turn-ding
或用命令行(desktop 换成你使用的 profile):
dsh plugin --profile desktop add dsh-turn-ding
桌面版需完全退出 DSH 后安装或更新,装好重新打开。 终端里找不到
dsh时,先在桌面版菜单选「管理 dsh 命令」。
在「插件 → 实验性插件」启用自定义插件索引,再到「发现 → 添加索引源」填入本仓库 index.json 的公开地址:
https://raw.githubusercontent.com/arrongao/dsh-turn-ding/main/index.json
索引只是省掉手输包名这一步,装的仍是同一个 npm 包。
dsh plugin --profile desktop add "D:/path/to/dsh-turn-ding"
dsh plugin --profile desktop add "file:D:/path/to/dsh-turn-ding-0.1.1.tgz"
在对应 profile 的 cordis.patch.yml(Windows 默认 %USERPROFILE%\.dsh\profiles\desktop\cordis.patch.yml)里,给插件行加上 config:
- id: turn-ding
name: 'dsh-turn-ding'
config:
sound: true
soundFile: 'C:\Windows\Media\Windows Notify System Generic.wav'
badge: true
ignoreSubagents: true
| 字段 | 默认 | 说明 |
|---|---|---|
sound |
true |
是否播放提示音 |
soundFile |
C:\Windows\Media\Windows Notify System Generic.wav |
任意本地 .wav 路径 |
badge |
true |
是否显示数字徽标 |
ignoreSubagents |
true |
是否忽略子会话的结束事件 |
其它可选系统音效位于 C:\Windows\Media\,例如 Windows Ding.wav、chimes.wav。留空即使用上表默认值。
lib/index.js 监听 session/event,识别正常完成的 turn,通过 stdin 行协议驱动一个常驻辅助进程。lib/badge-server.ps1 用 Win32 ITaskbarList3.SetOverlayIcon 绘制徽标,用 System.Media.SoundPlayer 播放音效,并轮询处理焦点变化与窗口句柄重绑定。DSH 的插件 host 是独立 Node 进程,拿不到 BrowserWindow,因此徽标由辅助进程按窗口句柄直接绘制到任务栏按钮上。
npm pack --dry-run # 确认将要发布的文件
node test/host-harness.mjs # host 事件判定逻辑
node test/e2e-badge.mjs # 端到端徽标绘制
node test/focus-regression.mjs # "前台也计数"回归测试
仓库 test/ 下另有辅助进程协议、自动清零、索引校验等脚本;截图为本地生成产物,不纳入版本控制。
npm login --registry=https://registry.npmjs.org/
npm version patch
npm pack --dry-run
npm publish --registry=https://registry.npmjs.org/ --access public
发布后同步 index.json 中的 version 与 publishTimestamp(Unix 秒),用 @deepseek-ai/dsh-plugin-market-index 的 parseMarketIndex() 校验通过,再更新托管地址。
若
~/.npmrc指向了镜像源,publish 需显式加--registry=https://registry.npmjs.org/。开启两步验证的账号发布时需输入 OTP,或改用 Automation token 免去验证码。
os: ["win32"] 会阻止在非 Windows 机器上安装。engines.dsh 仅作声明:安装器按 peerDependencies 做兼容校验,本包不设该字段。
dsh-turn-ding/
├── package.json # dsh.bundle.patch 是"这是 DSH 插件"的标记
├── cordis.patch.yml # 插件注入声明
├── index.json # 「发现」用的格式 1 索引(托管到公开 URL 后使用)
├── README.md
├── LICENSE
├── .gitignore
├── lib/
│ ├── index.js # host 侧:事件监听与辅助进程生命周期
│ └── badge-server.ps1 # Win32 侧:徽标绘制、提示音、轮询维护
└── test/ # 验证脚本(截图为本地生成,不入库)
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: notification。