Wechsels/dsh-zotero-wiki1

dsh-zotero-wiki

dsh-zotero-wiki: Zotero sync, MinerU PDF parsing and DeepSeek note generation

AI 分析

核心用途是构建学术文献与知识管理工作流。适合科研人员、学生等需要同步 Zotero 文献、解析 PDF 并自动生成 Obsidian 笔记的用户。必要条件是配置相关 API 凭据。

パッケージ
dsh-zotero-wiki
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/14

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Wechsels/dsh-zotero-wiki

ドキュメント

README 全文を読む ↗

配置

所有配置在插件目录下的 .env(参见 .env.example):

必填默认说明
ZOTERO_MODElocallocal / web
ZOTERO_DATA_DIRlocal 可选自动探测zotero.sqlitestorage/ 的目录
ZOTERO_API_KEY / ZOTERO_USER_ID / ZOTERO_GROUP_IDweb 必填Web API 凭据(Group 优先于 User)
OBSIDIAN_VAULT_PATHVault 根目录
SYNC_SCOPE_JSON交互选择持久化同步范围,如 {"mode":"all","collectionKeys":[],"tags":[]}
MINERU_TOKENparse 必填MinerU 官方平台 Token
MINERU_MODEL_VERSIONpipeline可选 vlm(质量更高)
MINERU_TIMEOUT_MS1200000单文件解析超时
DEEPSEEK_API_KEYparse/综述必填DeepSeek API Key
DEEPSEEK_MODELdeepseek-chat
NOTE_TOKEN_LIMIT100000每篇全文截断上限(按字符保守估算)
MAX_PARSE_PER_SYNC50单轮最多上传解析篇数(保护 MinerU 免费额度)
PARSE_CONCURRENCY3解析并发上限
REVIEW_REGEN_THRESHOLD5综述累计新增 N 篇后全量重生成
REVIEW_NOTE_CHARS2000综述生成时每篇笔记送入 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:

KeyRequiredDefaultPurpose
ZOTERO_MODEyeslocallocal / web
ZOTERO_DATA_DIRlocal, optionalauto-detectDirectory containing zotero.sqlite and storage/
ZOTERO_API_KEY / ZOTERO_USER_ID / ZOTERO_GROUP_IDwebWeb API credentials (Group wins over User)
OBSIDIAN_VAULT_PATHyesVault root
SYNC_SCOPE_JSONnointeractivePersisted sync scope, e.g. {"mode":"all","collectionKeys":[],"tags":[]}
MINERU_TOKENparseMinerU official platform token
MINERU_MODEL_VERSIONnopipelinevlm for higher quality
DEEPSEEK_API_KEYparse/reviewsDeepSeek API key
NOTE_TOKEN_LIMITno100000Per-paper truncation cap (conservative char-based estimate)
MAX_PARSE_PER_SYNCno50Max uploads per run (protects MinerU free quota)
PARSE_CONCURRENCYno3Parse concurrency
REVIEW_REGEN_THRESHOLDno5Regenerate 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)

ToolDescription
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.md is append-only; pages are never physically deleted — items removed from Zotero get status: archived and 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 in wiki/

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)