{"id":51615938,"url":"https://github.com/itcuihao/chunzen","last_synced_at":"2026-07-12T13:30:59.806Z","repository":{"id":360339850,"uuid":"1247945188","full_name":"itcuihao/chunzen","owner":"itcuihao","description":"春蝉 (Chunzen) — 沉浸式学术论文 PDF 阅读与 AI 双语翻译 VS Code 插件 | An immersive academic PDF reader and AI bilingual translation extension for VS Code.","archived":false,"fork":false,"pushed_at":"2026-06-18T01:48:10.000Z","size":7987,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T02:04:20.261Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itcuihao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T01:43:42.000Z","updated_at":"2026-06-18T01:48:14.000Z","dependencies_parsed_at":"2026-06-18T02:01:23.578Z","dependency_job_id":null,"html_url":"https://github.com/itcuihao/chunzen","commit_stats":null,"previous_names":["itcuihao/chunzen"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/itcuihao/chunzen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcuihao%2Fchunzen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcuihao%2Fchunzen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcuihao%2Fchunzen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcuihao%2Fchunzen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itcuihao","download_url":"https://codeload.github.com/itcuihao/chunzen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itcuihao%2Fchunzen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35393398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-12T13:30:59.334Z","updated_at":"2026-07-12T13:30:59.796Z","avatar_url":"https://github.com/itcuihao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/itcuihao/chunzen/main/media/icon.png\" width=\"128\" alt=\"春蝉 ChunZen Logo\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e春蝉 ChunZen\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e在 VSCode 中沉浸式阅读学术 PDF，支持划词/划句翻译、期刊信息查询、术语表管理，让文献阅读更高效。\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/version-0.1.0-blue\" alt=\"Version\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/VSCode-≥1.85.0-blue\" alt=\"VSCode\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/itcuihao/chunzen/main/media/summary.png\" alt=\"春蝉预览\" /\u003e\n\u003c/p\u003e\n\n## 功能特性\n\n### 实时翻译\n\n- **划词/划句翻译** — 在 PDF 中划选任意单词或句子，右侧翻译面板将自动展示翻译结果\n- **整页翻译** — 一键翻译当前页面所有段落，支持原文/译文/双语对照三种视图\n- **多引擎自动切换** — 按优先级依次尝试，首个成功即返回：\n  - 百度翻译\n  - DeepL（免费/专业版）\n  - AI 翻译（OpenAI 兼容接口，支持 DeepSeek、SiliconFlow、Gemini 等）\n  - 自定义 HTTP 接口\n- **拖拽排序引擎优先级** — 在设置面板中拖拽调整引擎顺序\n- **翻译缓存** — LRU 内存缓存 + 磁盘持久化，避免重复请求\n- **翻译历史** — 自动记录最近 100 条翻译，支持导出为 Markdown\n\n### 期刊信息查询\n\n- **自动提取 DOI/ISSN** — 从 PDF 首页文本中正则匹配\n- **双数据源** — 科研通 (AbleSci) / LetPub，自动故障转移\n- **期刊指标** — 影响因子、中科院分区、JCR 分区、预警状态\n- **深度信息** — 自引率、审稿周期、录用率、出版社、投稿链接\n- **论文元数据** — 发表年份、第一作者、通讯作者、所属机构\n\n### 术语表\n\n- **60+ 预置学术术语** — 覆盖 AI/CS、生物医学、化学、物理、通用学术 5 大类\n- **自定义添加** — 手动添加术语对照，支持分类管理\n- **文件导入** — 支持 CSV/TSV/TXT/JSON 格式批量导入\n- **翻译时自动匹配** — LLM 引擎注入系统提示词，非 LLM 引擎后处理替换\n\n### PDF 阅读体验\n\n- **自定义 PDF 渲染器** — 基于 PDF.js 的 Canvas 渲染 + 文字层叠加\n- **智能段落解析** — 多栏检测、标题识别、参考文献/表格/图注结构化识别\n- **水平分隔线检测** — 从 PDF 矢量路径中提取，作为段落边界\n- **噪声过滤** — 自动跳过页眉页脚、水印、作者机构信息\n- **跨页重复文本检测** — 识别并隐藏跨页重复的边缘文本\n- **段落悬停双向高亮** — 鼠标悬停在 PDF 段落或右侧对照面板上，双向同步高亮，方便中英文逐段/逐句对比阅读\n- **表格图片回退** — 检测表格区域并截图为图片，避免乱码翻译\n- **图片区域截图** — 工具栏 📷 按钮，手动截图当前页面的图注区域\n\n### 侧边栏面板\n\n- **翻译标签页** — 原文、译文、双语对照，支持整页翻译和自动翻页翻译\n- **期刊标签页** — 期刊基本信息、深度指标、论文元数据，可折叠展示\n- **术语标签页** — 术语列表、搜索过滤、分类标签、添加/编辑/删除\n- **设置标签页** — 引擎配置（拖拽排序）、期刊数据源、版面解析、缓存管理\n\n### 主题支持\n\n- **暖色深色主题** — 深褐暖色调，长时间阅读更舒适\n- **暖色浅色主题** — 奶油纸张色调，自然光环境下友好\n- **自适应切换** — 跟随 VSCode 深色/浅色主题自动切换\n\n## 快速开始\n\n1. 在项目的 **Releases** 页面下载最新打包的 `chunzen-*.vsix` 插件文件。\n2. 打开 VS Code，进入扩展视图（`Cmd+Shift+X` 或 `Ctrl+Shift+X`），点击右上角的 `...` 更多操作菜单，选择 **从 VSIX 安装... (Install from VSIX...)**，导入下载好的 `.vsix` 文件完成安装。\n\n   \u003cp align=\"center\"\u003e\n     \u003cimg src=\"https://raw.githubusercontent.com/itcuihao/chunzen/main/media/install.png\" alt=\"从 VSIX 安装插件\" /\u003e\n   \u003c/p\u003e\n\n3. 用 VS Code 打开任意 `.pdf` 文件，春蝉会自动接管渲染。\n4. 在侧边栏 **设置** 中配置翻译引擎的 API Key。在 PDF 中划选任意英文句子，或在右侧面板点击 **翻译整页**，即可看到对应的翻译结果。\n\n## 翻译引擎配置\n\n### AI 翻译（OpenAI 兼容接口）\n\n支持任何 OpenAI 兼容的 API，包括 MiniMax、Gemini、本地模型等：\n\n| 设置项 | 说明 | 默认值 |\n|--------|------|--------|\n| API Key | 对应平台的密钥 | — |\n| Base URL | API 端点地址 | `https://api.openai.com/v1` |\n| 模型名称 | 使用的模型 | `gpt-4o-mini` |\n| 系统提示词 | 翻译风格指令 | 学术翻译专家提示词 |\n\n**MiniMax 示例配置：**\n- Base URL: `https://api.minimaxi.com/v1`\n- Model: `MiniMax-M2.7`\n- API Key: 在 [MiniMax 开放平台](https://platform.minimaxi.com) 获取\n\n### 百度翻译\n\n需要在 [百度翻译开放平台](https://fanyi-api.baidu.com) 注册获取 App ID 和密钥。\n\n### DeepL\n\n在 [DeepL](https://www.deepl.com/pro-api) 获取 API Key，支持免费版和专业版。\n\n## 命令面板\n\n| 命令 | 说明 |\n|------|------|\n| `春蝉: 截取当前图注区域` | 手动截图当前页面的图片区域，保存为 PNG |\n\n## 键盘快捷键与阅读手势\n\n| 按键 / 动作 | 功能 |\n|------|------|\n| `PageDown` / `Space` (触底) / `↓` (触底) | 翻至下一页 |\n| `PageUp` / `Shift+Space` (触顶) / `↑` (触顶) | 翻至上一页 |\n| `→` (触右边缘) | 翻至下一页 |\n| `←` (触左边缘) | 翻至上一页 |\n| 滚轮向下滚动 (触底) | 翻至下一页（带 800ms 防连刷冷却机制） |\n| 滚轮向上滚动 (触顶) | 翻至上一页（带 800ms 防连刷冷却机制） |\n| `+` / `=` | 放大页面 |\n| `-` | 缩小页面 |\n\n## 技术栈\n\n- **Preact** + **@preact/signals** — 侧边栏 UI（~5KB）\n- **PDF.js 3.11** — PDF 渲染引擎（CDN 加载）\n- **Zustand** — 侧边栏状态管理\n- **Tailwind CSS** — 样式系统\n- **Webpack** — 多目标构建（extension / panel / pdfViewer）\n\n## 支持作者\n\n如果春蝉对您的科研工作有帮助，欢迎请作者喝杯咖啡 ☕\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/itcuihao/chunzen/main/media/alipay-qrcode.png\" width=\"200\" alt=\"支付宝\" /\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"https://raw.githubusercontent.com/itcuihao/chunzen/main/media/wechat-qrcode.png\" width=\"200\" alt=\"微信\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cem\u003e支付宝\u003c/em\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003cem\u003e微信\u003c/em\u003e\n\u003c/p\u003e\n\n## 反馈与贡献\n\n- 问题反馈：[GitHub Issues](https://github.com/itcuihao/chunzen/issues)\n- 功能建议：欢迎提交 Issue 讨论\n\n## 许可证\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitcuihao%2Fchunzen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitcuihao%2Fchunzen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitcuihao%2Fchunzen/lists"}