dsh-zotero-wiki
集 Zotero 同步、MinerU PDF 解析与 DeepSeek 笔记生成于一体的插件。
AI 分析
核心用途是构建学术文献与知识管理工作流。适合科研人员、学生等需要同步 Zotero 文献、解析 PDF 并自动生成 Obsidian 笔记的用户。必要条件是配置相关 API 凭据。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Wechsels/dsh-zotero-wiki說明文件
閱讀完整 README ↗配置
所有配置在插件目录下的 .env(参见 .env.example):
| 键 | 必填 | 默认 | 说明 |
|---|---|---|---|
ZOTERO_MODE | 是 | local | local / web |
ZOTERO_DATA_DIR | local 可选 | 自动探测 | 含 zotero.sqlite 与 storage/ 的目录 |
ZOTERO_API_KEY / ZOTERO_USER_ID / ZOTERO_GROUP_ID | web 必填 | — | Web API 凭据(Group 优先于 User) |
OBSIDIAN_VAULT_PATH | 是 | — | Vault 根目录 |
SYNC_SCOPE_JSON | 否 | 交互选择 | 持久化同步范围,如 {"mode":"all","collectionKeys":[],"tags":[]} |
MINERU_TOKEN | parse 必填 | — | MinerU 官方平台 Token |
MINERU_MODEL_VERSION | 否 | pipeline | 可选 vlm(质量更高) |
MINERU_TIMEOUT_MS | 否 | 1200000 | 单文件解析超时 |
DEEPSEEK_API_KEY | parse/综述必填 | — | DeepSeek API Key |
DEEPSEEK_MODEL | 否 | deepseek-chat | |
NOTE_TOKEN_LIMIT | 否 | 100000 | 每篇全文截断上限(按字符保守估算) |
MAX_PARSE_PER_SYNC | 否 | 50 | 单轮最多上传解析篇数(保护 MinerU 免费额度) |
PARSE_CONCURRENCY | 否 | 3 | 解析并发上限 |
REVIEW_REGEN_THRESHOLD | 否 | 5 | 综述累计新增 N 篇后全量重生成 |
REVIEW_NOTE_CHARS | 否 | 2000 | 综述生成时每篇笔记送入 LLM 的字数上限 |
CLI(完整能力,首次配置入口)
node dist/cli.js sync # 增量同步;首次弹交互选择范围并持久化
node dist/cli.js sync --interactive # 重新选择同步范围
node dist/cli.js parse --dry-run # 预览待解析候选与配额占用
node dist/cli.js parse # MinerU 解析 + DeepSeek 笔记生成
node dist/cli.js compile # 综述/索引/交叉链接/归档标记
node dist/cli.js compile --no-review # 跳过 LLM 综述(无需 DEEPSEEK_API_KEY)
Configuration
All settings live in .env inside the plugin directory (see .env.example). Key entries:
| Key | Required | Default | Purpose |
|---|---|---|---|
ZOTERO_MODE | yes | local | local / web |
ZOTERO_DATA_DIR | local, optional | auto-detect | Directory containing zotero.sqlite and storage/ |
ZOTERO_API_KEY / ZOTERO_USER_ID / ZOTERO_GROUP_ID | web | — | Web API credentials (Group wins over User) |
OBSIDIAN_VAULT_PATH | yes | — | Vault root |
SYNC_SCOPE_JSON | no | interactive | Persisted sync scope, e.g. {"mode":"all","collectionKeys":[],"tags":[]} |
MINERU_TOKEN | parse | — | MinerU official platform token |
MINERU_MODEL_VERSION | no | pipeline | vlm for higher quality |
DEEPSEEK_API_KEY | parse/reviews | — | DeepSeek API key |
NOTE_TOKEN_LIMIT | no | 100000 | Per-paper truncation cap (conservative char-based estimate) |
MAX_PARSE_PER_SYNC | no | 50 | Max uploads per run (protects MinerU free quota) |
PARSE_CONCURRENCY | no | 3 | Parse concurrency |
REVIEW_REGEN_THRESHOLD | no | 5 | Regenerate a topic review after N accumulated new notes |
Usage
CLI (full capabilities; first-run configuration entry point)
node dist/cli.js sync # incremental sync; interactive scope picker on first run
node dist/cli.js sync --interactive # re-select sync scope
node dist/cli.js parse --dry-run # preview pending candidates and quota usage
node dist/cli.js parse # MinerU parsing + DeepSeek note generation
node dist/cli.js compile # reviews / indexes / cross-links / archive marks
node dist/cli.js compile --no-review # skip LLM reviews (no DEEPSEEK_API_KEY needed)
dsh native tools (agent side)
| Tool | Description |
|---|---|
query_zotero_wiki(query, topic?, max_results?) | Search the wiki; returns snippets, metadata and [Zotero key, §section] citations; replies "nothing found in the wiki" when empty |
sync_zotero_wiki() | Manual incremental sync + index rebuild |
parse_zotero_wiki() | Manual parse & note generation (quota-limited) + index rebuild |
Sync behavior contract
- Startup sync silently reuses the last persisted scope; interactive selection only happens on first run or with
--interactive - Existing pages are updated/extended, new items create new pages,
log.mdis append-only; pages are never physically deleted — items removed from Zotero getstatus: archivedand are auto-restored if they come back - Items without any Collection are skipped until classified in Zotero
- An item in multiple Collections: one copy in
raw/(first Collection), one note page per topic inwiki/
CLI (full capabilities; first-run configuration entry point)
node dist/cli.js sync # incremental sync; interactive scope picker on first run
node dist/cli.js sync --interactive # re-select sync scope
node dist/cli.js parse --dry-run # preview pending candidates and quota usage
node dist/cli.js parse # MinerU parsing + DeepSeek note generation
node dist/cli.js compile # reviews / indexes / cross-links / archive marks
node dist/cli.js compile --no-review # skip LLM reviews (no DEEPSEEK_API_KEY needed)