No description
Find a file
2026-04-27 20:34:47 +08:00
.planning fix: VaultStep.__init__ missing step_id and checker in super() call 2026-04-27 19:49:36 +08:00
command fix: VaultStep.__init__ missing step_id and checker in super() call 2026-04-27 19:49:36 +08:00
docs fix: VaultStep.__init__ missing step_id and checker in super() call 2026-04-27 19:49:36 +08:00
paperforge fix: OCR diagnostic L2 probe uses POST instead of GET (PaddleOCR rejects GET) 2026-04-27 20:34:47 +08:00
scripts fix: VaultStep.__init__ missing step_id and checker in super() call 2026-04-27 19:49:36 +08:00
tests fix: OCR diagnostic L2 probe uses POST instead of GET (PaddleOCR rejects GET) 2026-04-27 20:34:47 +08:00
.gitignore chore: remove user data and old files from repo 2026-04-25 00:25:37 +08:00
.pre-commit-config.yaml feat(17-dead-code-precommit): add ruff config, pre-commit hooks, Check 5, and OCR error context 2026-04-27 17:29:13 +08:00
AGENTS.md docs(18-documentation-ux-polish): add ADR-012/013 and update AGENTS.md command table 2026-04-27 18:06:03 +08:00
CHANGELOG.md docs: clear [Unreleased] section per Keep a Changelog convention after v1.4 release 2026-04-27 19:08:48 +08:00
CONTRIBUTING.md docs(DX-04): create CONTRIBUTING.md with dev setup and conventions 2026-04-27 17:59:18 +08:00
paperforge.json feat(UX-01): add auto_analyze_after_ocr config and OCR hook 2026-04-27 17:57:33 +08:00
pyproject.toml chore: bump version to 1.4.0 for v1.4 release 2026-04-27 19:06:55 +08:00
README.md docs: update README for v1.4 — add structured logging, tqdm, retry, pre-commit; fix chart type count 14->19; update docs links 2026-04-27 19:17:35 +08:00
requirements.txt fix: add textual to requirements.txt 2026-04-23 00:09:00 +08:00
setup_wizard.py fix: VaultStep.__init__ missing step_id and checker in super() call 2026-04-27 19:49:36 +08:00

PaperForge Lite

基于 Obsidian + Zotero + PaddleOCR 的医学文献精读工作流,支持自动 OCR、深度阅读笔记生成和队列管理。

    ______  ___  ______ _________________ ___________ _____  _____
    | ___ \/ _ \ | ___ \  ___| ___ \  ___|  _  | ___ \  __ \|  ___|
    | |_/ / /_\ \| |_/ / |__ | |_/ / |_  | | | | |_/ / |  \/| |__
    |  __/|  _  ||  __/|  __||    /|  _| | | | |    /| | __ |  __|
    | |   | | | || |   | |___| |\ \| |   \ \_/ / |\ \| |_\ \| |___
    \_|   \_| |_/\_|   \____/\_| \_\_|    \___/\_| \_|\____/\____/

快速开始(推荐方式)

PaperForge 提供交互式安装向导,引导你完成全部配置:

# 1. 克隆仓库
git clone https://github.com/LLLin000/PaperForge.git
cd PaperForge

# 2. 运行向导(交互式,按步骤引导)
python setup_wizard.py --vault /path/to/your/vault

向导会自动完成:

  • 检测 Python 环境和依赖
  • 安装 PaperForge 工具包(pip install -e . 由向导自动执行)
  • 配置 Vault 目录结构(可自定义名称)
  • 链接 Zotero 数据目录
  • 检测 Better BibTeX 插件
  • 配置 JSON 自动导出
  • 部署工作流脚本和 Agent 命令
  • 创建 .env 配置文件

功能特性

  • 交互式安装向导 — 步骤引导,自动检测,安全验证
  • /pf-deep — 深度精读Keshav 三阶段阅读法)
  • 自动 OCR 提取 — PaddleOCR-VL API 提取全文和图表
  • 图表类型智能识别 — 19 种图表类型自动检测
  • 图表质量审查指南 — 19 种图表类型的专业审查清单
  • Zotero 双向同步 — Better BibTeX 自动导出
  • 文献队列管理 — Obsidian Base 集成
  • 结构化日志--verbose/-v 全局参数stderr 诊断输出,不影响管道 stdout
  • 进度指示tqdm 进度条 + --no-progress 全局参数
  • 自动重试 — tenacity 指数退避OCR 上传/轮询自动恢复
  • 代码质量栅栏 — pre-commit hooks + ruff 检查 + 重复代码检测
  • 自动更新paperforge update

安装要求

  • Python 3.10+
  • Zotero + Better BibTeX 插件
  • Obsidian
  • PaddleOCR API Key安装后配置

目录结构

your-vault/
├── [资源目录]/                  # 安装时可自定义
│   └── [文献索引目录]/
│       └── library-records/     # 文献状态跟踪
├── [系统目录]/                  # 安装时可自定义
│   ├── PaperForge/
│   │   ├── exports/             # Zotero JSON 导出
│   │   └── ocr/                 # OCR 结果
│   └── Zotero/                  # Junction 到 Zotero 数据目录
├── [Agent配置目录]/             # 根据平台和安装配置决定
│   └── skills/
│       └── literature-qa/
│           ├── scripts/ld_deep.py
│           ├── prompt_deep_subagent.md
│               └── chart-reading/   # 19 种图表阅读指南
├── .env                         # API Key 配置
├── paperforge.json              # 版本配置
└── AGENTS.md                    # 安装后指南

文档

核心命令

# PaperForge CLI在终端中直接运行
paperforge status            # 查看状态
paperforge sync              # 同步 Zotero 文献并生成正式笔记
paperforge ocr               # 运行 PDF OCR支持 --verbose, --no-progress
paperforge deep-reading      # 查看精读队列(支持 --verbose
paperforge --verbose ...     # 全局 --verbose/-v 启用 DEBUG 日志

# Agent 命令(在 OpenCode 中使用)
/pf-deep <zotero_key>    # 完整三阶段精读(需要 AI 理解论文)
/pf-paper <zotero_key>   # 快速摘要(需要 AI 理解论文)
/pf-sync                 # 同步 ZoteroAgent 帮你检查并执行)
/pf-ocr                  # 运行 OCRAgent 帮你检查队列并执行)
/pf-status               # 查看状态Agent 帮你解读诊断结果)

双模式说明/pf-sync/pf-ocr/pf-statuspaperforge sync/ocr/status 是同一命令的两种调用方式。你可以在终端直接运行 CLI也可以在 OpenCode 中使用 /pf-* 让 Agent 帮你检查前置条件并解读输出。

License

MIT License — 允许商业使用,需保留版权声明。