Translate README to Chinese

This commit is contained in:
qyh15 2026-05-20 16:33:11 +08:00
parent d4c64e02e5
commit 76f9a21eef
1 changed files with 41 additions and 35 deletions

View File

@ -1,19 +1,19 @@
# Zotero Obsidian Literature Skill # Zotero-Obsidian 文献工作流 Skill
Codex skill for managing a Zotero-to-Obsidian literature workflow. 这是一个用于管理 Zotero 到 Obsidian 文献阅读流程的 Codex skill。
It helps generate Zotero child-note AI reading notes, audit missing generated notes, maintain Obsidian literature notes, and build Dataview dashboards without committing private API keys. 它主要用于把 AI 生成的文献阅读笔记写入 Zotero 子笔记,检查哪些条目还没有生成笔记,维护 Obsidian 文献笔记,并生成 Dataview 仪表盘。同时,它会把 Zotero、DeepSeek 或 AwesomeGPT 的真实密钥保存在本地忽略文件中,避免提交到 Git 仓库。
## What It Does ## 功能
- Generates AI literature notes as Zotero child notes. - 将 AI 文献笔记生成到 Zotero 子笔记中。
- Uses Obsidian templates and prompt files from the target vault. - 使用目标 Obsidian 库中的模板和提示词文件。
- Supports one item, selected item keys, or approved whole-library batches. - 支持单篇文献、指定多个 Zotero 条目,或在明确确认后批量处理整个文库。
- Audits Zotero items that are missing generated AI notes. - 检查 Zotero 中还没有生成 AI 笔记的条目。
- Keeps real Zotero and DeepSeek/AwesomeGPT credentials in a local ignored config file. - 将 Zotero 和 DeepSeek/AwesomeGPT 凭据保存在本地私有配置中。
- Provides Obsidian integration guidance for Dataview and Markdown maintenance. - 提供 Obsidian、Dataview 和 Markdown 维护相关的工作流说明。
## Repository Layout ## 仓库结构
```text ```text
. .
@ -33,81 +33,87 @@ It helps generate Zotero child-note AI reading notes, audit missing generated no
`-- init_private_config.py `-- init_private_config.py
``` ```
## Requirements ## 使用前提
- Zotero Desktop is open. - Zotero Desktop 已打开。
- Zotero Local API is enabled at `http://127.0.0.1:23119`. - Zotero Local API 已启用,地址为 `http://127.0.0.1:23119`
- Python launcher `py` is available on Windows. - Windows 中可使用 Python 启动器 `py`
- The default Obsidian vault is `C:\Users\qyh15\Documents\Obsidian Vault`. - 默认 Obsidian 库路径为 `C:\Users\qyh15\Documents\Obsidian Vault`
- The vault contains the expected templates under `00 Templater`. - Obsidian 库中 `00 Templater` 目录下有对应模板和提示词。
- A Zotero Web API key is available for note writes. - 已准备 Zotero Web API key用于写入 Zotero 笔记。
- DeepSeek or another OpenAI-compatible endpoint is configured through AwesomeGPT settings, environment variables, or the local private config. - DeepSeek 或其他 OpenAI 兼容接口已通过 AwesomeGPT 设置、环境变量或本地私有配置完成配置。
## Private Config ## 私有配置
Do not commit real API keys. 不要提交真实 API key。
The committed file is only a template: 仓库中只提交模板文件:
```text ```text
config/config.template.json config/config.template.json
``` ```
Create the local ignored config with: 使用下面的命令创建本地私有配置:
```powershell ```powershell
py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\init_private_config.py" py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\init_private_config.py"
``` ```
This writes: 该命令会生成:
```text ```text
config/config.local.json config/config.local.json
``` ```
`config/config.local.json` is ignored by Git. Do not paste its contents into chat, logs, README files, or committed examples. `config/config.local.json` 已被 Git 忽略。不要把它的内容粘贴到聊天、日志、README 或任何会提交到仓库的示例文件中。
## Common Commands ## 常用命令
Generate a note for one Zotero item: 为单个 Zotero 条目生成笔记:
```powershell ```powershell
py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-key SXAIQUJT --skip-existing py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-key SXAIQUJT --skip-existing
``` ```
Generate notes for selected items: 为指定多个 Zotero 条目生成笔记:
```powershell ```powershell
py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-keys "SXAIQUJT X7GJZ627 ZCZXGRAM" --limit 0 --skip-existing --fulltext-chars 4000 py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\generate_zotero_ai_note.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --item-keys "SXAIQUJT X7GJZ627 ZCZXGRAM" --limit 0 --skip-existing --fulltext-chars 4000
``` ```
Audit missing generated notes: 检查哪些条目缺少已生成的 AI 笔记:
```powershell ```powershell
py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\audit_zotero_ai_notes.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --keys-only py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\audit_zotero_ai_notes.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --keys-only
``` ```
Rebuild the audit cache: 重建检查缓存:
```powershell ```powershell
py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\audit_zotero_ai_notes.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --rebuild py "$env:USERPROFILE\.codex\skills\zotero-obsidian-literature\scripts\audit_zotero_ai_notes.py" --vault "C:\Users\qyh15\Documents\Obsidian Vault" --rebuild
``` ```
## Batch Safety ## 批处理安全
Whole-library generation writes many Zotero child notes. Use it only after explicitly confirming the target library and write scope. 整库生成会向 Zotero 写入大量子笔记。只有在明确确认目标文库和写入范围后,才使用整库批处理。
For long runs, prefer batches of 20-30 items and keep `--skip-existing` enabled so interrupted runs can resume without duplicating notes. 长任务建议每批处理 20-30 个条目,并保持 `--skip-existing` 开启。这样即使中途中断,也可以重新运行并跳过已经生成过的笔记,避免重复写入。
## Git ## Git
Current remote: 当前远程仓库:
```text ```text
git@git.qyhhh.top:Skills/MYwirte-skill.git git@git.qyhhh.top:Skills/MYwirte-skill.git
``` ```
Recommended push command in this environment: 当前环境推荐的推送命令:
```powershell
git push
```
如果新终端还不能直接识别 `git`,可以临时使用完整路径:
```powershell ```powershell
& "$env:USERPROFILE\.codex\tools\mingit\cmd\git.exe" push & "$env:USERPROFILE\.codex\tools\mingit\cmd\git.exe" push