Invoice-Downloader
EthanYoQ
电子发票整理与报销准备工具:从邮箱批量收集 PDF/OFD/XML 发票,OCR 识别、分类归档并生成 Excel 汇总;提供 Windows/macOS 桌面版与 DSH 插件。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:PinkyKan/dsh-plugin-readme-zh
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文(由本插件自动翻译)
Translate the documentation of any installed plugin on the Plugins page into Simplified Chinese — both the long detail document and the list-row title/description one-liners — keep every result in a persistent cache, and re-translate only the parts a plugin update actually changes.
DSH plugins ship their user documentation as an English README (or a meta.detail document), and their list rows show the bundle's meta.title / meta.description with a literal English fallback. This bundle does two things:
All translations are produced by the model selected as the agent default (or an explicitly configured provider and model), and are stored under $DSH_HOME/plugin-data/dsh-plugin-readme-zh/ (Markdown segments plus short strings).
The detail button is hidden when the plugin has no readable document, its files are unavailable, or its document is already Chinese.
Opt-in via metaSidecars: true (off by default). When enabled, for each profile-installed bundle the translations are kept in its own package directory:
locale/zh.json gains meta.title / meta.description (merged into any existing file; author-provided Chinese is never touched);locale/ directory at all, a locale/en.json mirroring the original English text is added too, because the loader reads no locale dictionaries without the English seed file;exports map, the standard DSH entry "./locale/*.json": "./locale/*.json" is appended so the module resolver can see the locale files (packages without an exports map need nothing).These are small, additive, idempotent writes into the installed package's own directory; a pnpm install that re-extracts the package simply resets it, and the next start re-applies it from the string cache.
Every document is split into ordered Markdown segments:
# … ######) first, so each section becomes its own chunk group: inserting or reordering a section changes only that section's hashes, not the rest of the document;The cache file records the document hash, the chunk hashes, and their translations. When a plugin is updated:
A translation interrupted by a restart keeps its finished chunks, so the next run continues instead of starting over.
Set these fields on the bundle row in the profile patch when the defaults do not fit:
| Field | Default | Meaning |
|---|---|---|
engine |
auto |
auto prefers the model service and falls back to the translator service; llm requires a model; translator uses only ctx.translator. |
provider |
agent default | Model provider route for translation. |
model |
agent default | Model id for translation. |
reasoningEffort |
off when supported |
Reasoning effort for the translation call. |
maxTokens |
8192 |
Output-token cap per chunk. |
translatorProvider |
bing |
Provider used when the translator fallback runs. |
metaSidecars |
false |
Opt-in: also write the translated list-row one-liners into the installed packages' own locale/ files (plus one standard exports entry where needed) so the Plugins list renders Chinese natively. Off by default — a public install keeps its hands off other packages. Set true to enable the list-row feature. |
The translation prompt requires the model to preserve Markdown syntax, code, URLs, file paths, package names, and identifiers, and to return only the translated fragment.
keptSource; it stays that way on later runs of an unchanged document.mailto:, and in-page anchors.locale/*.json sidecars and one exports entry) is opt-in via metaSidecars: true, off by default, so a public install does not touch other packages. When enabled, a pnpm install that re-extracts a package resets those files; the next start re-applies them from the cache.$DSH_HOME; another profile starts with an empty cache.The package is a plain DSH bundle with no npm dependencies of its own, so any of these work:
| Route | How | Notes |
|---|---|---|
| Tarball (offline) | npm pack → share the .tgz → install with dsh plugin --profile <name> add file:/abs/path/<name>.tgz |
Needs no registry and no network. This is the route used on machines where GitHub and the npm website are unreachable. |
| Local directory | dsh plugin --profile <name> add link:/abs/path/dsh-plugin-readme-zh |
Live edits are picked up on reload; used during development. |
| npm registry | npm publish --registry=https://registry.npmjs.org/, then dsh plugin --profile <name> add <package-name> |
Requires an npm account created through the website; a mirror such as registry.npmmirror.com cannot publish. |
| Git repository | dsh plugin --profile <name> add git+https://github.com/<owner>/<repo> |
The bundle reads its files from a checkout; needs reachable GitHub. |
After any of these, enable the bundle in the Plugins page (or add it to dsh.profile.bundles) and set metaSidecars: true if the list-row translation is wanted.
The bundle was checked through static syntax checks and unit tests of the Markdown splitter (code fences, tables, HTML blocks, and long prose all round-trip exactly) plus live checks in the running Web profile: the routes answer on /api/plugin-readme-zh and its /v1 alias, the 中文说明 control appears on installed plugin detail pages, and the list-row meta sidecars were confirmed by the loader reporting skipped (already-Chinese) for every profile bundle.
engine: translator switches to the anonymous translation service.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: im。