papersearch 0.7.3 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/NOTICE +8 -37
  2. package/README.fr.md +265 -0
  3. package/README.ja.md +265 -0
  4. package/README.ko.md +265 -0
  5. package/README.md +149 -148
  6. package/README.zh-Hant.md +265 -0
  7. package/README.zh.md +265 -0
  8. package/dist/capabilities/download/batch/batch.d.ts +20 -1
  9. package/dist/capabilities/download/batch/batch.d.ts.map +1 -1
  10. package/dist/capabilities/download/batch/batch.js +1057 -208
  11. package/dist/capabilities/download/batch/batch.js.map +1 -1
  12. package/dist/capabilities/download/batch/batchFolder.d.ts.map +1 -1
  13. package/dist/capabilities/download/batch/batchFolder.js +3 -2
  14. package/dist/capabilities/download/batch/batchFolder.js.map +1 -1
  15. package/dist/capabilities/download/batch/networkLoss.d.ts +11 -2
  16. package/dist/capabilities/download/batch/networkLoss.d.ts.map +1 -1
  17. package/dist/capabilities/download/batch/networkLoss.js +24 -3
  18. package/dist/capabilities/download/batch/networkLoss.js.map +1 -1
  19. package/dist/capabilities/download/batch/resume.d.ts +7 -0
  20. package/dist/capabilities/download/batch/resume.d.ts.map +1 -1
  21. package/dist/capabilities/download/batch/resume.js +50 -9
  22. package/dist/capabilities/download/batch/resume.js.map +1 -1
  23. package/dist/capabilities/download/batch/windowPlan.d.ts +96 -0
  24. package/dist/capabilities/download/batch/windowPlan.d.ts.map +1 -0
  25. package/dist/capabilities/download/batch/windowPlan.js +196 -0
  26. package/dist/capabilities/download/batch/windowPlan.js.map +1 -0
  27. package/dist/capabilities/download/content/markdown/pro.d.ts +6 -0
  28. package/dist/capabilities/download/content/markdown/pro.d.ts.map +1 -1
  29. package/dist/capabilities/download/content/markdown/pro.js.map +1 -1
  30. package/dist/capabilities/download/content/markdown/shortfall.d.ts +8 -5
  31. package/dist/capabilities/download/content/markdown/shortfall.d.ts.map +1 -1
  32. package/dist/capabilities/download/content/markdown/shortfall.js +22 -10
  33. package/dist/capabilities/download/content/markdown/shortfall.js.map +1 -1
  34. package/dist/capabilities/download/content/markdown/step.d.ts +9 -0
  35. package/dist/capabilities/download/content/markdown/step.d.ts.map +1 -1
  36. package/dist/capabilities/download/content/markdown/step.js +46 -3
  37. package/dist/capabilities/download/content/markdown/step.js.map +1 -1
  38. package/dist/capabilities/download/content/markdown/types.d.ts +10 -1
  39. package/dist/capabilities/download/content/markdown/types.d.ts.map +1 -1
  40. package/dist/capabilities/download/content/pdf/open/tiers/scihub.d.ts.map +1 -1
  41. package/dist/capabilities/download/content/pdf/open/tiers/scihub.js +3 -1
  42. package/dist/capabilities/download/content/pdf/open/tiers/scihub.js.map +1 -1
  43. package/dist/capabilities/download/handler.d.ts.map +1 -1
  44. package/dist/capabilities/download/handler.js +13 -5
  45. package/dist/capabilities/download/handler.js.map +1 -1
  46. package/dist/capabilities/download/outputLayout.d.ts.map +1 -1
  47. package/dist/capabilities/download/outputLayout.js +3 -1
  48. package/dist/capabilities/download/outputLayout.js.map +1 -1
  49. package/dist/capabilities/download/tools.js +2 -2
  50. package/dist/capabilities/download/tools.js.map +1 -1
  51. package/dist/capabilities/download/types.d.ts +9 -1
  52. package/dist/capabilities/download/types.d.ts.map +1 -1
  53. package/dist/cli.js +3 -1
  54. package/dist/cli.js.map +1 -1
  55. package/dist/infrastructure/http/hostGate.d.ts +24 -0
  56. package/dist/infrastructure/http/hostGate.d.ts.map +1 -0
  57. package/dist/infrastructure/http/hostGate.js +72 -0
  58. package/dist/infrastructure/http/hostGate.js.map +1 -0
  59. package/dist/infrastructure/pdf/PdfDownload.d.ts +1 -0
  60. package/dist/infrastructure/pdf/PdfDownload.d.ts.map +1 -1
  61. package/dist/infrastructure/pdf/PdfDownload.js +6 -1
  62. package/dist/infrastructure/pdf/PdfDownload.js.map +1 -1
  63. package/dist/infrastructure/runlog/RunLedger.d.ts +14 -0
  64. package/dist/infrastructure/runlog/RunLedger.d.ts.map +1 -1
  65. package/dist/infrastructure/runlog/RunLedger.js +30 -4
  66. package/dist/infrastructure/runlog/RunLedger.js.map +1 -1
  67. package/dist/infrastructure/runlog/failureClass.d.ts +2 -1
  68. package/dist/infrastructure/runlog/failureClass.d.ts.map +1 -1
  69. package/dist/infrastructure/runlog/failureClass.js +27 -4
  70. package/dist/infrastructure/runlog/failureClass.js.map +1 -1
  71. package/dist/infrastructure/school/SchoolAttempt.d.ts +11 -0
  72. package/dist/infrastructure/school/SchoolAttempt.d.ts.map +1 -1
  73. package/dist/infrastructure/school/SchoolAttempt.js +48 -5
  74. package/dist/infrastructure/school/SchoolAttempt.js.map +1 -1
  75. package/dist/infrastructure/school/SchoolMcpClient.d.ts +13 -2
  76. package/dist/infrastructure/school/SchoolMcpClient.d.ts.map +1 -1
  77. package/dist/infrastructure/school/SchoolMcpClient.js +138 -15
  78. package/dist/infrastructure/school/SchoolMcpClient.js.map +1 -1
  79. package/dist/infrastructure/school/SchoolProgress.d.ts +2 -0
  80. package/dist/infrastructure/school/SchoolProgress.d.ts.map +1 -1
  81. package/dist/infrastructure/school/SchoolProgress.js +2 -0
  82. package/dist/infrastructure/school/SchoolProgress.js.map +1 -1
  83. package/dist/infrastructure/school/SchoolReadiness.d.ts +9 -0
  84. package/dist/infrastructure/school/SchoolReadiness.d.ts.map +1 -1
  85. package/dist/infrastructure/school/SchoolReadiness.js +10 -0
  86. package/dist/infrastructure/school/SchoolReadiness.js.map +1 -1
  87. package/dist/infrastructure/school/SchoolResultNormalizer.d.ts.map +1 -1
  88. package/dist/infrastructure/school/SchoolResultNormalizer.js +4 -0
  89. package/dist/infrastructure/school/SchoolResultNormalizer.js.map +1 -1
  90. package/dist/infrastructure/school/index.d.ts +2 -2
  91. package/dist/infrastructure/school/index.d.ts.map +1 -1
  92. package/dist/infrastructure/school/index.js +1 -1
  93. package/dist/infrastructure/school/index.js.map +1 -1
  94. package/dist/infrastructure/school/types.d.ts +73 -1
  95. package/dist/infrastructure/school/types.d.ts.map +1 -1
  96. package/dist/infrastructure/school/types.js.map +1 -1
  97. package/dist/infrastructure/security/SecurityUtils.d.ts.map +1 -1
  98. package/dist/infrastructure/security/SecurityUtils.js +6 -2
  99. package/dist/infrastructure/security/SecurityUtils.js.map +1 -1
  100. package/dist/management/failures/index.d.ts +23 -0
  101. package/dist/management/failures/index.d.ts.map +1 -1
  102. package/dist/management/failures/index.js +68 -20
  103. package/dist/management/failures/index.js.map +1 -1
  104. package/dist/management/school/autoUpdate.d.ts.map +1 -1
  105. package/dist/management/school/autoUpdate.js +9 -1
  106. package/dist/management/school/autoUpdate.js.map +1 -1
  107. package/dist/management/school/cliProgress.d.ts.map +1 -1
  108. package/dist/management/school/cliProgress.js +3 -1
  109. package/dist/management/school/cliProgress.js.map +1 -1
  110. package/package.json +8 -3
  111. package/school/NOTICE +3 -2
  112. package/school/paper_search_school/adapters/__init__.py +2 -0
  113. package/school/paper_search_school/adapters/aps/__init__.py +3 -6
  114. package/school/paper_search_school/adapters/base.py +19 -2
  115. package/school/paper_search_school/adapters/copernicus/__init__.py +2 -7
  116. package/school/paper_search_school/adapters/elsevier/__init__.py +50 -1
  117. package/school/paper_search_school/adapters/frontiers/__init__.py +41 -2
  118. package/school/paper_search_school/adapters/ieee/__init__.py +6 -4
  119. package/school/paper_search_school/adapters/iop/__init__.py +8 -0
  120. package/school/paper_search_school/adapters/jama/__init__.py +8 -0
  121. package/school/paper_search_school/adapters/lww/__init__.py +14 -6
  122. package/school/paper_search_school/adapters/mdpi/__init__.py +12 -7
  123. package/school/paper_search_school/adapters/neurology/__init__.py +5 -2
  124. package/school/paper_search_school/adapters/optica/__init__.py +52 -13
  125. package/school/paper_search_school/adapters/oup/__init__.py +7 -4
  126. package/school/paper_search_school/adapters/platforms/__init__.py +4 -1
  127. package/school/paper_search_school/adapters/platforms/atypon/__init__.py +12 -3
  128. package/school/paper_search_school/adapters/platforms/figshare/__init__.py +23 -4
  129. package/school/paper_search_school/adapters/platforms/jstage/__init__.py +64 -0
  130. package/school/paper_search_school/adapters/taylor_francis/__init__.py +0 -3
  131. package/school/paper_search_school/adapters/thieme/__init__.py +2 -9
  132. package/school/paper_search_school/api_keys.py +63 -13
  133. package/school/paper_search_school/assets/api_keys.json +14 -0
  134. package/school/paper_search_school/assets/capsule.html +526 -147
  135. package/school/paper_search_school/assets/capsule_en.json +140 -49
  136. package/school/paper_search_school/assets/capsule_fr.json +141 -50
  137. package/school/paper_search_school/assets/capsule_ja.json +140 -49
  138. package/school/paper_search_school/assets/capsule_ko.json +140 -49
  139. package/school/paper_search_school/assets/capsule_zh-Hant.json +134 -48
  140. package/school/paper_search_school/browser/backend.py +125 -4
  141. package/school/paper_search_school/browser/batch_session.py +189 -8
  142. package/school/paper_search_school/browser/challenge/__init__.py +12 -9
  143. package/school/paper_search_school/browser/challenge/continuation.py +83 -0
  144. package/school/paper_search_school/browser/challenge/handlers/__init__.py +1 -0
  145. package/school/paper_search_school/browser/challenge/handlers/aws_waf.py +260 -0
  146. package/school/paper_search_school/browser/challenge/handlers/recaptcha_hcaptcha.py +167 -0
  147. package/school/paper_search_school/browser/challenge/handlers/text_captcha.py +128 -0
  148. package/school/paper_search_school/browser/challenge/handlers/turnstile.py +174 -0
  149. package/school/paper_search_school/browser/challenge/kinds.py +203 -0
  150. package/school/paper_search_school/browser/challenge/local/__init__.py +1 -0
  151. package/school/paper_search_school/browser/challenge/{interaction.py → local/interaction.py} +94 -13
  152. package/school/paper_search_school/browser/challenge/{pointer.py → local/pointer.py} +2 -2
  153. package/school/paper_search_school/browser/challenge/local/prompt.py +283 -0
  154. package/school/paper_search_school/browser/challenge/local/submission.py +33 -0
  155. package/school/paper_search_school/browser/challenge/pro.py +24 -0
  156. package/school/paper_search_school/browser/challenge/services/__init__.py +1 -0
  157. package/school/paper_search_school/browser/challenge/services/solver.py +292 -0
  158. package/school/paper_search_school/browser/engine.py +4 -1
  159. package/school/paper_search_school/browser/user_turn.py +126 -0
  160. package/school/paper_search_school/browser/watchdog.py +213 -60
  161. package/school/paper_search_school/cli_config.py +10 -5
  162. package/school/paper_search_school/config.py +16 -10
  163. package/school/paper_search_school/download_diagnostics.py +7 -2
  164. package/school/paper_search_school/engine/access_rules.py +12 -3
  165. package/school/paper_search_school/engine/batch.py +52 -18
  166. package/school/paper_search_school/engine/batch_access.py +62 -16
  167. package/school/paper_search_school/engine/batch_capture.py +260 -31
  168. package/school/paper_search_school/engine/batch_common.py +3 -0
  169. package/school/paper_search_school/engine/batch_diagnostics.py +25 -5
  170. package/school/paper_search_school/engine/batch_institution.py +52 -3
  171. package/school/paper_search_school/engine/batch_login.py +398 -36
  172. package/school/paper_search_school/engine/batch_pdf_urls.py +38 -7
  173. package/school/paper_search_school/engine/batch_user.py +48 -3
  174. package/school/paper_search_school/engine/batch_waits.py +221 -14
  175. package/school/paper_search_school/engine/bridge.py +29 -6
  176. package/school/paper_search_school/engine/fulltext_page.py +55 -8
  177. package/school/paper_search_school/engine/router.py +16 -1
  178. package/school/paper_search_school/engine/supplements.py +7 -1
  179. package/school/paper_search_school/entitlements.py +29 -1
  180. package/school/paper_search_school/pdf_utils.py +25 -16
  181. package/school/paper_search_school/progress_capsule.py +69 -11
  182. package/school/paper_search_school/progress_reporter.py +243 -11
  183. package/school/paper_search_school/progress_view.py +205 -91
  184. package/school/paper_search_school/publishers/builtin/iop.json +2 -1
  185. package/school/paper_search_school/publishers/builtin/neurology.json +4 -2
  186. package/school/paper_search_school/publishers/site.py +12 -4
  187. package/school/paper_search_school/rate_limit.py +24 -1
  188. package/school/paper_search_school/school_login.py +170 -8
  189. package/school/paper_search_school/school_test.py +1 -1
  190. package/school/paper_search_school/server.py +179 -23
  191. package/school/paper_search_school/user_settings.py +46 -4
  192. package/school/pyproject.toml +1 -0
  193. package/skills/paper-search/SKILL.md +107 -107
  194. package/skills/paper-search/references/browser-download.md +102 -99
  195. package/skills/paper-search/references/capability-routing.md +89 -89
  196. package/skills/paper-search/references/cli-contract.md +78 -78
  197. package/skills/paper-search/references/federation-support.md +172 -172
  198. package/skills/paper-search/references/management-layer.md +78 -78
  199. package/skills/paper-search/references/publisher-support.md +38 -38
  200. package/skills/paper-search/references/school-setup.md +56 -55
  201. package/skills/paper-search/references/setup.md +20 -20
  202. package/skills/paper-search/references/troubleshooting.md +12 -12
  203. package/README.en.md +0 -264
  204. package/school/paper_search_school/browser/challenge/prompt.py +0 -154
@@ -1,100 +1,101 @@
1
- # 机构下载:安装扩展、配置学校、选择浏览器
1
+ # School download: install the extension, set the school, choose the browser
2
2
 
3
- 学校订阅下载(经学校所属的学术身份联盟或 OpenAthens 登录)让 PaperSearch 用用户学校的权限,在浏览器里下载需要订阅的论文。在有图形界面的电脑上,用户同意后才装:用户说“请开始配置”或第一次要下订阅文章时问一次;用户说过不要(`PAPER_SEARCH_SCHOOL_DECLINED=true`)或没有图形界面的服务器上不装、不问。检索和开放下载不需要它。
3
+ School subscription downloads (signing in through the school's academic identity federation or OpenAthens) let PaperSearch use the user's school access to download subscription papers in a browser. On a computer with a graphical interface it is installed only after the user agrees: ask once when the user says "start setup" or first wants a subscription article; when the user said no (`PAPER_SEARCH_SCHOOL_DECLINED=true`), or on a server without a graphical interface, do not install it and do not ask. Search and open download do not need it.
4
4
 
5
- ## 查看与安装
5
+ ## Check and install
6
6
 
7
7
  ```bash
8
8
  paper-search school status --format text
9
9
  ```
10
10
 
11
- 显示是否已装、安装目录、所用浏览器(Google Chrome 的路径和版本、驱动版本)、学校、PaperSearch 是否已启用它。Chrome 低于测试过的版本时会提示先更新 Chrome。
11
+ Shows whether it is installed, the install directory, the browser used (Google Chrome's path and version, the driver version), the school, and whether PaperSearch has it enabled. When Chrome is older than the tested version, it says to update Chrome first.
12
12
 
13
- 用户同意后运行(Agent 代装时加 `--yes --skip-school`):
13
+ After the user agrees, run (when the agent installs it for the user, add `--yes --skip-school`):
14
14
 
15
15
  ```bash
16
16
  paper-search school install
17
17
  ```
18
18
 
19
- - 需要图形界面:学校登录要在看得见的浏览器里完成。没有图形界面的 Linux(服务器,没有 `DISPLAY` 或 `WAYLAND_DISPLAY`)上安装会在第一步停下,`paper-search setup` 也不再问是否安装;这类机器用 `paper-search setup <KEY>` 配 key,检索和开放获取下载照常可用。
20
- - 需要本机已装 Google Chrome;没有时安装会停下。这时告诉用户要先装 Chrome,用户同意后替用户装:macOS 有 Homebrew 时运行 `brew install --cask google-chrome`,Windows 运行 `winget install -e --id Google.Chrome`;装好后再运行同一条 `school install`。没有 Homebrew 或 winget、或安装失败时,请用户从 https://www.google.com/chrome/ 下载安装。`--browser ego` 改用用户自己的 ego lite(仅 macOS)。
21
- - 安装前会列出安装位置和下载量(约 0.5 GB,不另下载浏览器),用户确认后才开始。`--yes` 跳过确认,只在用户已经同意后使用。
22
- - 用户不需要先装 Python;中途失败时,处理提示的问题后再运行同一命令,会从失败的那一步接着装。
23
- - 装完会打开设置窗口的 API key 页,用户填好或不需要时点右上角 × 关闭。
24
- - 装完会自动启用(`PAPER_SEARCH_SCHOOL_ENABLED=true`、`PAPER_SEARCH_SCHOOL_EXECUTABLE` 指向新装的后端)。原来配置了别的后端时,会先问用户是否替换。
25
- - 安装时会问学校;`--skip-school` 跳过,之后再配置。
26
- - 首次配置扩展时会询问是否开启系统通知。新配置默认关闭,回车保留当前选择;`--yes` 不代表同意开启通知。Agent 代为配置时先问用户要开启还是关闭,再通过同一后端的 `config set progress_notify true` 或 `false` 保存,已有明确选择不重复询问。以后可在胶囊齿轮 → 等待和提醒里点“系统通知”开关立即修改;关闭不影响琥珀色呼吸和点击唤回浏览器。
27
- - 进度窗口的设置(下载文件夹、等待和提醒、API key):点胶囊齿轮,或运行 `paper-search settings [about|download|wait|keys|<KEY>]`(about:版本和更新)。没有下载时它单独打开窗口,关掉设置窗口就消失。
28
- - `paper-search setup` 最后也会问是否安装扩展;`--skip-school` 不问,`--install-school` 直接安装。
19
+ - Needs a graphical interface: the school login must happen in a visible browser. On Linux without a graphical interface (a server, with no `DISPLAY` or `WAYLAND_DISPLAY`) installation stops at the first step, and `paper-search setup` no longer asks whether to install it; on such machines use `paper-search setup <KEY>` for keys; search and open-access download work as usual.
20
+ - Needs Google Chrome on this computer; without it, installation stops. Then tell the user that Chrome must be installed first; after the user agrees, install it for them: on macOS with Homebrew run `brew install --cask google-chrome`, on Windows run `winget install -e --id Google.Chrome`; then run the same `school install` again. Without Homebrew or winget, or when the installation fails, ask the user to download and install it from https://www.google.com/chrome/. `--browser ego` uses the user's own ego lite instead (macOS only).
21
+ - Before installing, it lists the install location and the download size (about 0.5 GB; no browser is downloaded), and starts only after the user confirms. `--yes` skips the confirmation; use it only after the user has agreed.
22
+ - The user does not need to install Python first; when it fails midway, fix the reported problem and run the same command again: it continues from the step that failed.
23
+ - When done, it opens the settings window on the API key page; the user closes it with the × at the top right after filling it in, or when nothing is needed.
24
+ - In development builds with YesCaptcha, the user enters ClientKey in Settings → API key → YesCaptcha, presses "测试" (Test) to check the balance, then "保存" (Save). Supported challenges send only puzzle images and the question; the local browser applies the answer. School sign-in pages are excluded. The test checks the key, not whether a website will accept an answer.
25
+ - It enables itself when done (`PAPER_SEARCH_SCHOOL_ENABLED=true`, `PAPER_SEARCH_SCHOOL_EXECUTABLE` pointing at the new backend). When another backend was configured, it first asks the user whether to replace it.
26
+ - Installation asks for the school; `--skip-school` skips that, to configure it later.
27
+ - The first time the extension is configured, it asks whether to turn on system notifications. New configurations default to off, and Enter keeps the current choice; `--yes` does not mean consent to turning notifications on. When the agent configures it for the user, first ask the user whether to turn them on or off, then save the answer with the same backend's `config set progress_notify true` or `false`; when there is already a clear choice, do not ask again. Later the user can change it at once with the "系统通知" (Notifications) switch under the capsule's gear → "等待和提醒" (Waits & alerts); turning it off does not affect the amber breathing or clicking to bring back the browser.
28
+ - The progress window's settings (download folder, waits and alerts, API keys): click the capsule's gear, or run `paper-search settings [about|download|wait|keys|<KEY>]` (about: version and updates). When no download is running, it opens a window of its own, which goes away when the settings window is closed.
29
+ - `paper-search setup` also asks at the end whether to install the extension; `--skip-school` does not ask, `--install-school` installs it directly.
29
30
 
30
- 用户自己维护的后端(例如仓库里的开发版)用 `paper-search config set PAPER_SEARCH_SCHOOL_EXECUTABLE <路径>` 指定;不要擅自改用户已配置的路径。
31
+ A backend the user maintains (such as the development build in the repository) is set with `paper-search config set PAPER_SEARCH_SCHOOL_EXECUTABLE <path>`; do not change a path the user configured on your own.
31
32
 
32
- ## 先登录学校(可选)
33
+ ## Sign in to the school first (optional)
33
34
 
34
35
  ```bash
35
- paper-search school login --doi <学校订阅的一篇文章的 DOI>
36
+ paper-search school login --doi <DOI of an article the school subscribes to>
36
37
  ```
37
38
 
38
- - 用在用户想在批量下载前先登录、或想试试登录是否正常时;平时不需要,下载遇到登录会自己停下等用户。
39
- - 它打开下载用的浏览器,自动过网站验证、选学校,停在学校登录页等用户登录(最多等 `browser_login_timeout` 秒,`--max-wait <秒>` 只改这一次);登录后核对这篇文章能看全文,不下载 PDF,登录状态留给之后的下载。
40
- - 只有 `success: true`(`state: signed_in`)才算登录成功。`access_without_login`:这篇不用登录就能看(开放获取或校园网),换一篇需要订阅的文章再试;`login_timeout`、`browser_closed`、`institution_pdf_entitlement_missing` 等按回复里的 `message` 告诉用户。
41
- - 下载浏览器和它的资料目录由程序管理,登录用这条命令或直接下载;不要翻源码另找登录办法。没装学校订阅下载或没配置学校时,按回复里的提示处理。
39
+ - Use it when the user wants to sign in before a batch download, or to try whether sign-in works; normally it is not needed: a download that meets a login stops and waits for the user.
40
+ - It opens the download browser, passes the site checks automatically, chooses the school, and stops at the school login page for the user to sign in (waiting at most `browser_login_timeout` seconds; `--max-wait <seconds>` changes it for this run only); after sign-in it checks that the full text of this article is visible, does not download the PDF, and keeps the sign-in for later downloads.
41
+ - Only `success: true` (`state: signed_in`) means sign-in succeeded. `access_without_login`: this article needs no sign-in (open access or campus network); try again with another article that needs a subscription; for `login_timeout`, `browser_closed`, `institution_pdf_entitlement_missing` and others, tell the user what the reply's `message` says.
42
+ - The program manages the download browser and its profile directory; sign in with this command or simply by downloading; do not dig through the source code for another way to sign in. When school subscription downloads are not installed or no school is configured, follow the hint in the reply.
42
43
 
43
- ## 更新与卸载
44
+ ## Update and uninstall
44
45
 
45
- - PaperSearch 升级后,第一次用到学校订阅下载时会自动做同样的更新(stderr 一行说明);用户关掉了自动更新(`PAPER_SEARCH_SCHOOL_AUTO_UPDATE=false`)或自动更新没成功时,`status` 提示扩展落后,运行 `paper-search school update`:重装后端和依赖,检查 Chrome;学校配置、登录会话、Chrome 和 ego lite 不动。以前用 Camoufox 的安装会改用 Chrome,并写明旧 Camoufox 浏览器所在的目录,由用户决定是否手动删除。已是最新时不做任何事;`--force` 强制重装。
46
- - 卸载:`paper-search school uninstall`。先列出要删和保留的内容,用户确认后删除安装目录;PaperSearch 配置指向这次安装的后端时,关闭机构下载并清除后端路径,指向别处时不改。学校配置和登录会话默认保留,会询问;`--yes` 时保留,除非另加 `--remove-data`。Google Chrome 和 ego lite 不受影响。
46
+ - After PaperSearch is upgraded, the first use of school subscription downloads makes the same update automatically (one line on stderr); when the user turned off automatic updates (`PAPER_SEARCH_SCHOOL_AUTO_UPDATE=false`) or the automatic update failed, `status` says the extension is behind; run `paper-search school update`: it reinstalls the backend and dependencies and checks Chrome; the school settings, sign-in sessions, Chrome and ego lite are left alone. An installation that used Camoufox switches to Chrome and states the directory of the old Camoufox browser; the user decides whether to delete it by hand. When it is already up to date it does nothing; `--force` forces a reinstall.
47
+ - Uninstall: `paper-search school uninstall`. It first lists what will be deleted and what kept, and deletes the install directory after the user confirms; when the PaperSearch config points at this installation's backend, it turns off the school download and clears the backend path; when it points elsewhere, it is left unchanged. School settings and sign-in sessions are kept by default, and it asks about them; with `--yes` they are kept unless `--remove-data` is also given. Google Chrome and ego lite are not affected.
47
48
 
48
- ## 学校
49
+ ## School
49
50
 
50
- 用户的学校写在后端配置里,由用户提供,不预设、不替换。用户只需说出学校名,所属联盟由后端判断,不要问用户是哪个联盟:
51
+ The user's school is stored in the backend configuration, as the user gives it; never preset or replace it. The user only needs to name the school; the backend works out its federation; do not ask the user which federation it is:
51
52
 
52
53
  ```bash
53
- paper-search-school setup --institution "用户说的校名" [--also-name "学校的英文正式名称"]
54
+ paper-search-school setup --institution "School name the user gave" [--also-name "The school's official English name"]
54
55
  ```
55
56
 
56
- - 目前支持中国内地和澳门(CARSI)、香港(HKAF)、新加坡(SGAF)、日本(GakuNin)、韩国(KAFE)、马来西亚(SIFULAN)、印度(INFED)、土耳其(YETKİM)、斯里兰卡(LIAF)、孟加拉(TIGERfed)、巴基斯坦(PKIFED)、阿曼(OMREN)、中国内地科研机构(CSTCloud)、沙特阿拉伯(Maeen)、塞浦路斯(CyNet)、以色列(IUCC)、伊朗(IRFED)、阿塞拜疆(AzScienceNet)、英国(UK federation)、爱尔兰(Edugate)、法国(RENATER)、荷兰(SURFconext)、比利时(Belnet)、卢森堡(eduID Luxembourg)、北欧、中欧、南欧和东欧各国,以及美洲、大洋洲和非洲各国(各联盟见 `federation-support.md`)的学术身份联盟,以及只经 OpenAthens 登录的学校。`--institution` 可以是校名(任何语言)、学校域名或 entityID;后端在各联盟的学校名单里查,确定是哪一所才保存,并保存它所属的联盟。
57
- - 联盟名单里的校名是当地语言和英文(中国内地、澳门有中文,日本有日文,土耳其有土耳其文,欧洲和拉丁美洲各国多有当地语言名,香港、韩国、新加坡、马来西亚、南亚、北美洲、大洋洲和非洲多只有英文)。用户说的校名不是英文时,加 `--also-name` 给出学校的英文正式名称(出版社多按英文名列学校);不确定英文名就不加。
58
- - 有些学校经多校共用的登录入口登录(如以色列、挪威、克罗地亚的大学,中国内地的科研院所,巴基斯坦、拉脱维亚的部分学校),联盟名单里只有它们的域名:按校名查不到时,用 `--institution <校名> --also-name <学校官网域名>` 再查一次,程序会按域名找到入口,并按所给校名在出版社搜索。
59
- - 返回 `school_ambiguous` 时,把 `candidates`(含学校名、联盟、域名)列给用户选,再用所选学校的 `entity_id` 作为 `--institution` 重新运行;只有一个候选也要问,那是名字不完全一致的学校。`school_not_found` 时请用户换成学校正式名称、英文名或学校域名,仍找不到就按回复里的 `reasons` 如实说明:这所学校可能没有接入学术身份联盟或 OpenAthens,学校订阅下载无法为它登录;`federation_not_supported` 是找到了学校但它所属的联盟还不支持,如实告诉用户;`school_list_unavailable` 是名单取不到,稍后重试。需要请用户反馈时,见 `federation-support.md`“学校登录不上时”。
60
- - `--carsi --institution` 只在 CARSI 名单里查(错误码 `carsi_school_*`);查 CARSI 名单:`paper-search-school setup --list-carsi-schools 关键词`。
61
- - `setup --check` 的 `school` 项为 `missing` 时,说明只存了学校名,按提示重新运行上面的命令。
62
- - 配置后,选联盟、选学校、点继续由程序完成;用户只在学校登录页输入账号密码、完成人机验证。
63
- - 没有配置学校时(`setup --carsi`),CARSI 照样开启,由用户在选校页自己选。
64
- - 出版社列表里找不到用户的学校时,报告找不到,不改选别的学校。
65
- - 后端命令要和下载使用同一个数据目录(PaperSearch 默认 `${XDG_DATA_HOME:-~/.local/share}/paper-search-cli/school`);需要时在命令前加 `SCHOOL_DATA_DIR=<该目录>`。登录状态保存在这个目录的下载浏览器里。
57
+ - Supported now: the academic identity federations of China mainland and Macao (CARSI), Hong Kong (HKAF), Singapore (SGAF), Japan (GakuNin), South Korea (KAFE), Malaysia (SIFULAN), India (INFED), Turkey (YETKİM), Sri Lanka (LIAF), Bangladesh (TIGERfed), Pakistan (PKIFED), Oman (OMREN), research institutes in China mainland (CSTCloud), Saudi Arabia (Maeen), Cyprus (CyNet), Israel (IUCC), Iran (IRFED), Azerbaijan (AzScienceNet), the United Kingdom (UK federation), Ireland (Edugate), France (RENATER), the Netherlands (SURFconext), Belgium (Belnet), Luxembourg (eduID Luxembourg), the countries of Northern, Central, Southern and Eastern Europe, and countries in the Americas, Oceania and Africa (each federation in `federation-support.md`), plus schools that sign in only through OpenAthens. `--institution` can be a school name (in any language), the school's domain or an entityID; the backend searches each federation's school list, saves only once it knows which school it is, and saves the federation it belongs to.
58
+ - Federation lists give school names in the local language and in English (China mainland and Macao have Chinese, Japan Japanese, Turkey Turkish, most European and Latin American countries local-language names; Hong Kong, South Korea, Singapore, Malaysia, South Asia, North America, Oceania and Africa mostly English only). When the school name the user gave is not English, add `--also-name` with the school's official English name (publishers mostly list schools by their English names); when you are unsure of the English name, leave it out.
59
+ - Some schools sign in through a login entry shared by several schools (universities in Israel, Norway and Croatia, research institutes in China mainland, some schools in Pakistan and Latvia), and the federation list has only their domains: when the school name finds nothing, search again with `--institution <school name> --also-name <school website domain>`; the program finds the entry by the domain and searches publishers by the given school name.
60
+ - On `school_ambiguous`, list the `candidates` (school name, federation, domain) for the user to choose, then rerun with the chosen school's `entity_id` as `--institution`; ask even when there is only one candidate: it is a school whose name does not quite match. On `school_not_found`, ask the user for the school's official name, English name or domain; when it is still not found, explain truthfully as the reply's `reasons` say: this school may not be connected to an academic identity federation or OpenAthens, and school subscription downloads cannot sign in for it; `federation_not_supported` means the school was found but its federation is not supported yet: tell the user so truthfully; `school_list_unavailable` means the list could not be fetched: retry later. When the user should send feedback, see "When school login fails" in `federation-support.md`.
61
+ - `--carsi --institution` searches only the CARSI list (error codes `carsi_school_*`); to look up the CARSI list: `paper-search-school setup --list-carsi-schools <keyword>`.
62
+ - When the `school` item of `setup --check` is `missing`, only the school name was saved; rerun the command above as the hint says.
63
+ - Once configured, the program chooses the federation and the school and presses continue; the user only enters the account and password on the school login page and completes human verification.
64
+ - With no school configured (`setup --carsi`), CARSI is still on, and the user chooses on the school-selection page.
65
+ - When the user's school is not in the publisher's list, report that it was not found; do not choose another school instead.
66
+ - Backend commands must use the same data directory as the downloads (PaperSearch's default is `${XDG_DATA_HOME:-~/.local/share}/paper-search-cli/school`); when needed, put `SCHOOL_DATA_DIR=<that directory>` before the command. The sign-in state is kept in the download browser in this directory.
66
67
 
67
- ### 几所学校
68
+ ### Several schools
68
69
 
69
- 可以存几所学校,其中一所是当前学校,下载默认用它。**只在用户明确要求时切换或指定学校,不要自己换,也不要建议换哪所。**
70
+ Several schools can be saved; one of them is the current school, which downloads use by default. **Switch or name a school only when the user clearly asks; never switch on your own, and do not suggest which one to switch to.**
70
71
 
71
72
  ```bash
72
- paper-search-school schools # 列出存过的学校,current 为当前学校
73
- paper-search-school use "学校名" # 切换当前学校;没存过就像 setup --institution 那样查到后存下
74
- paper-search-school forget "学校名" # 从列表删掉(不能删当前学校)
73
+ paper-search-school schools # list saved schools; current is the current school
74
+ paper-search-school use "School name" # switch the current school; when not saved yet, look it up and save it as setup --institution does
75
+ paper-search-school forget "School name" # remove it from the list (the current school cannot be removed)
75
76
  ```
76
77
 
77
- - 用 `setup --institution` 换学校时,原来的学校也会留在列表里。`use` 可以用校名、英文名、域名或 entityID;返回 `school_ambiguous` 时把 `candidates` 列给用户选。没存过的学校,`use` 的查找和报错同上(`--also-name` 也一样)。
78
- - 只这一批用另一所已存的学校(用户说“这几篇用某某学校下”):`download_batch` 加 `school`(校名等),当前学校不变,这一批的“接着下”也用它。扩展太旧不认得时报“需要更新”(`school_update_needed`),运行 `paper-search school update`。
79
- - 各校的登录都在同一个下载浏览器里,切换不会登出别的学校;账号密码仍由用户在学校登录页输入。
78
+ - When `setup --institution` changes the school, the old school stays in the list too. `use` accepts a school name, English name, domain or entityID; on `school_ambiguous`, list the `candidates` for the user to choose. For a school not saved yet, `use` looks it up and reports errors as above (`--also-name` too).
79
+ - To use another saved school only for this batch (the user says "download these with school X"): add `school` (the school name, etc.) to `download_batch`; the current school does not change, and this batch's "go on" (接着下) uses it too. When the extension is too old to know it, it reports "需要更新" (update needed, `school_update_needed`); run `paper-search school update`.
80
+ - Every school's sign-in is in the same download browser; switching does not sign out of the others; the user still enters the account and password on the school login page.
80
81
 
81
- ## 浏览器
82
+ ## Browser
82
83
 
83
- 后端配置键 `browser_backend` 二选一:
84
+ The backend setting `browser_backend` takes one of two values:
84
85
 
85
- - `chrome`(默认):用户本机的 Google Chrome,由后端用单独的浏览器资料启动,不动用户日常 Chrome 的资料和标签页。第一次下载时用户在它的窗口里登录一次学校,之后保留。日常和批量下载用它。Chrome 装在别处时:`paper-search-school config set chrome_executable <Chrome 程序路径>`。旧值 `camoufox` 按 `chrome` 处理。
86
- - `ego`:需要沿用用户 ego lite 里已有的登录时选用(Chromium 内核,用户和 agent 看的是同一个浏览器,仅 macOS)。用户须在 ego 打开 `chrome://inspect/#remote-debugging`,勾选一次 “Allow remote debugging for this browser instance”。每次连接(例如 ego 重启后)ego 会弹出一次“允许连接”,由用户确认;ego 窗口在后台时常被直接拒绝,下载会立即报错并写明原因,请用户把 ego 放到前台、点“允许”后重试。
86
+ - `chrome` (default): the user's own Google Chrome, started by the backend with a separate browser profile, not touching the profile and tabs of the user's everyday Chrome. At the first download the user signs in to the school once in its window, and the sign-in is kept afterwards. Use it for everyday and batch downloads. When Chrome is installed elsewhere: `paper-search-school config set chrome_executable <Chrome program path>`. The old value `camoufox` is treated as `chrome`.
87
+ - `ego`: choose it to reuse sign-ins already in the user's ego lite (Chromium-based; the user and the agent look at the same browser; macOS only). The user must open `chrome://inspect/#remote-debugging` in ego and tick "Allow remote debugging for this browser instance" once. On each connection (for example after ego restarts) ego shows an "允许连接" (allow connection) prompt once, for the user to confirm; when the ego window is in the background the connection is often refused outright, and the download reports an error at once with the reason: ask the user to bring ego to the front, press "允许" (Allow), and retry.
87
88
 
88
- 查看或切换:
89
+ Check or switch:
89
90
 
90
91
  ```bash
91
92
  paper-search-school config get browser_backend
92
93
  paper-search-school config set browser_backend chrome
93
94
  ```
94
95
 
95
- 两套浏览器资料互不影响,切换不会删除另一套。用户没有要求时不擅自切换;也可以用 `paper-search school install --browser ego` 切换安装。
96
+ The two browser profiles do not affect each other; switching does not delete the other one. Do not switch unless the user asks; `paper-search school install --browser ego` also switches the installation.
96
97
 
97
- ## 边界
98
+ ## Boundaries
98
99
 
99
- - 账号、密码、验证码只由用户在浏览器里输入;不在聊天、命令参数、配置或日志里出现。
100
- - `doctor` 显示 `entitled_access` 为 `available`,只说明后端能连上,不代表已登录或对某篇有权限。
100
+ - The account, password and verification codes are entered only by the user in the browser; they never appear in the chat, command arguments, configuration or logs.
101
+ - `entitled_access` as `available` in `doctor` only means the backend can be reached; it does not mean signed in, or access to any paper.
@@ -1,39 +1,39 @@
1
- # 配置:请开始配置
1
+ # Setup: "start setup" (请开始配置)
2
2
 
3
- 用户说“请开始配置”(或“配置 PaperSearch”“start setup”)时,按下面固定的流程做。一次只问一个问题,等用户回答了再往下走;不要把所有配置项一起列出来让用户填。
3
+ When the user says "start setup" (or "请开始配置", "配置 PaperSearch", "set up PaperSearch"), follow the fixed flow below. Ask one question at a time and wait for the answer before going on; do not list all the settings for the user to fill in at once.
4
4
 
5
- 1. 运行 `paper-search doctor --format text`,先看清哪些已经配好;这一步不用问用户。找不到 `paper-search` 命令时,先按 `management-layer.md` 的“只装了 Skill 时”征得同意装好,再运行它。
6
- 2. 只问一个问题:要不要用学校订阅下载(机构配置)。问的时候说明它用学校账号下载非 OA 文章的全文和补充材料,需要 Google Chrome(没有时一起装)。以下情况不问:已经装好(`doctor` 的 `entitled_access` 是 `available`)直接走 A;这台机器没有图形界面,或用户说过不要(`PAPER_SEARCH_SCHOOL_DECLINED` 为 `true`),直接走 B。用户说不要时运行 `paper-search config set PAPER_SEARCH_SCHOOL_DECLINED true` 记下来,再走 B。
5
+ 1. Run `paper-search doctor --format text` to see what is already set up; this step needs no question to the user. When there is no `paper-search` command, first install it with the user's consent as "When only the Skill is installed" in `management-layer.md` says, then run it.
6
+ 2. Ask only one question: whether to use school subscription downloads (school setup). When asking, explain that it downloads the full texts and supplementary files of non-OA articles with the school account, and needs Google Chrome (installed too if missing). Do not ask in these cases: already installed (`entitled_access` in `doctor` is `available`): go straight to A; this computer has no graphical interface, or the user said no before (`PAPER_SEARCH_SCHOOL_DECLINED` is `true`): go straight to B. When the user says no, run `paper-search config set PAPER_SEARCH_SCHOOL_DECLINED true` to record it, then go to B.
7
7
 
8
- A. 机构配置(用户同意用学校订阅下载)
8
+ A. School setup (the user agrees to use school subscription downloads)
9
9
 
10
- 1. 没装时安装(见 `school-setup.md`):`paper-search school install --yes --skip-school`,没有 Chrome 时先装 Chrome。
11
- 2. 直接问用户的学校并设好:运行 `paper-search-school setup --institution "学校名"`(见 `school-setup.md` 的“学校”一节)。只有用户主动说跳过时才跳过,那样第一次下载时在选校页选。
12
- 3. 其余配置都在设置窗口里做:装完设置窗口会自己打开;没打开或早已装好时,直接运行 `paper-search settings` 打开设置窗口。告诉用户在窗口里填要用的 API key、改下载文件夹和等待时间,每个 key 可以点“测试”,填完点右上角 × 关闭。推荐先填 EasyScholar(影响因子和分区)和 Semantic Scholar(正文片段),其余 key 非必须。不在对话里逐项问 key 或下载文件夹。
13
- 4. 用户说填好了,运行 `paper-search doctor --format text`,告诉用户现在能用哪些功能。
10
+ 1. When it is not installed, install it (see `school-setup.md`): `paper-search school install --yes --skip-school`; when there is no Chrome, install Chrome first.
11
+ 2. Ask the user for their school right away and set it: run `paper-search-school setup --institution "School name"` (see "School" in `school-setup.md`). Skip this only when the user says to skip it; then they choose on the school-selection page at the first download.
12
+ 3. Everything else is set in the settings window: it opens by itself after installation; when it did not open, or it was installed long ago, run `paper-search settings` directly to open the settings window. Tell the user to enter the API keys they want and change the download folder and wait times in the window; each key has a "测试" (Test) button; when done, close it with the × at the top right. Recommend EasyScholar (impact factors and quartiles) and Semantic Scholar (body snippets) first; the other keys are optional. Do not ask for keys or the download folder one by one in the chat.
13
+ 4. When the user says they are done, run `paper-search doctor --format text` and tell the user what they can use now.
14
14
 
15
- B. 不用机构配置
15
+ B. No school setup
16
16
 
17
- 1. 只推荐两个 key:`EASYSCHOLAR_KEY`(影响因子和分区)、`SEMANTIC_SCHOLAR_API_KEY`(正文片段),给出申请入口(`doctor` 的 To enable 一行);其余 key 都非必须,用户问起再说。用户说都不需要就跳到第 4 步。
18
- 2. 请用户在自己的终端运行 `paper-search setup --skip-school` 填 key(输入时不显示),填完告诉你。
19
- 3. 用户说填好了,对填了的每个 key 运行 `paper-search config test <KEY>` 确认能用。
20
- 4. 设好默认下载文件夹(见下面“默认下载文件夹”)。
21
- 5. 运行 `paper-search doctor --format text`,告诉用户现在能用哪些功能。
17
+ 1. Recommend only two keys: `EASYSCHOLAR_KEY` (impact factors and quartiles) and `SEMANTIC_SCHOLAR_API_KEY` (body snippets), with where to apply (the To enable line in `doctor`); all other keys are optional; mention them only when the user asks. When the user needs neither, skip to step 4.
18
+ 2. Ask the user to run `paper-search setup --skip-school` in their own terminal to enter the keys (the input is hidden), and to tell you when done.
19
+ 3. When the user says they are done, run `paper-search config test <KEY>` for each key they entered to confirm it works.
20
+ 4. Set the default download folder (see "Default download folder" below).
21
+ 5. Run `paper-search doctor --format text` and tell the user what they can use now.
22
22
 
23
- 不在“请开始配置”里时:用户第一次要下订阅文章、学校订阅下载还没装、用户没说过不要、这台机器有图形界面,也问一次要不要装(说明同第 2 步),同意后按 A 的 1–3 做。用户只问某个功能缺什么时,只提这个功能要的 key 和申请入口,填法按 A 的第 3 步(设置窗口)或 B 的第 2 步(终端)。
23
+ Outside "start setup": when the user first wants a subscription article, school subscription downloads are not installed, the user has not said no, and this computer has a graphical interface, also ask once whether to install it (explained as in step 2); when they agree, do steps 1–3 of A. When the user only asks what a capability lacks, mention only the key it needs and where to apply; for entering it, use step 3 of A (the settings window) or step 2 of B (the terminal).
24
24
 
25
- ## 默认下载文件夹
25
+ ## Default download folder
26
26
 
27
- 配置时,或第一次要下载而还没设过时,先看有没有设好:
27
+ During setup, or at the first download when it has not been set, first check whether it is set:
28
28
 
29
29
  ```bash
30
30
  paper-search config get DEFAULT_DOWNLOAD_PATH
31
31
  ```
32
32
 
33
- 没有设置(返回的 `configured` 为 `false`)时问用户:“下载的论文默认放到哪个文件夹?”用户给出位置后保存为完整路径(`~` 表示用户目录):
33
+ When it is not set (`configured` is `false`), ask the user: "Which folder should downloaded papers go to by default?" When the user gives a place, save it as a full path (`~` means the home folder):
34
34
 
35
35
  ```bash
36
36
  paper-search config set DEFAULT_DOWNLOAD_PATH "~/Documents/Papers"
37
37
  ```
38
38
 
39
- 之后下载不传 `savePath` / `--save-path`,文件自动存到这个文件夹里每次新建的 `<年月日-时分秒>_PaperSearchDownload` 文件夹;只有用户这一次指定了别的位置才传。没有设置时,文件会存到命令当前所在目录下的 `./downloads`,位置不固定,用户很难找到。用户也可以在进度胶囊的设置里改这个文件夹。
39
+ After that, do not pass `savePath` / `--save-path` when downloading: files go into a new `<YYYYMMDD-HHmmss>_PaperSearchDownload` folder created in this folder each time; pass it only when the user names another place for this download. When it is not set, files go to `./downloads` under the command's current directory, a place that changes and that users find hard to locate. Users can also change this folder in the settings of the progress capsule.
@@ -1,15 +1,15 @@
1
- # 检索类命令出错时
1
+ # When search commands fail
2
2
 
3
- | 场景 | 处理 |
3
+ | Situation | What to do |
4
4
  | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
5
- | 命令不存在 | 按 `management-layer.md` 的“只装了 Skill 时”,征得用户同意后安装 |
6
- | Windows 的 PowerShell 拦住 `paper-search`、`npm`(脚本执行策略) | 改用 `paper-search.cmd`、`npm.cmd`;不改执行策略 |
7
- | Windows 上 `--json-args` 报 `is not valid JSON` | PowerShell 去掉了参数里的双引号:把 JSON 写进文件,传 `--json-args '@<文件路径>'` |
8
- | API key 或 email 缺失 | 告诉用户三件事:这个功能要哪个 key;去哪里申请(报错或 `paper-search doctor --format text` 里给的网址);申请后在自己的终端运行 `paper-search setup <KEY>` 填入,再用 `paper-search config test <KEY>` 确认能用;装了学校订阅下载、用户就在这台电脑前时,也可以运行 `paper-search settings <KEY>` 打开设置窗口让用户填(没装或没有图形界面时它返回错误并给出终端命令)。填好后重跑原来的命令。 |
9
- | Google Scholar 返回 CAPTCHA/429 或异常流量页 | Scholar 是尽力而为的来源,默认 `0.5 RPS`、缓存成功结果,遇到验证页立即停止。等一段时间后用 `--platform googlescholar --max-results 1` 重试;必要时配置有授权的 `GOOGLE_SCHOLAR_PROXY_URL`。它不在 `--sources all` 默认列表中 |
10
- | Google Scholar 仍不可用、又不想配置 key | 用 `paper-search search "<检索词>" --sources no-key --max-results 5 --pretty`(Crossref、PubMed、Europe PMC、arXiv、OpenReview) |
11
- | 429 限流 | 降低 `--max-results`,换平台,或提示配置可选 key |
12
- | 0 结果 | 放宽关键词,换英文同义词,换平台,或用 `--sources` 扩展 |
13
- | 下载失败 | 用统一的 `download_with_fallback` 并报告各 attempt;涉及学校权限的失败按 `browser-download.md` 的失败分类处理 |
5
+ | Command not found | Install it with the user's consent, as "When only the Skill is installed" in `management-layer.md` says |
6
+ | Windows PowerShell blocks `paper-search` or `npm` (script execution policy) | Use `paper-search.cmd` and `npm.cmd` instead; do not change the execution policy |
7
+ | On Windows, `--json-args` reports `is not valid JSON` | PowerShell removed the double quotes in the argument: write the JSON to a file and pass `--json-args '@<file path>'` |
8
+ | API key or email missing | Tell the user three things: which key this capability needs; where to apply (the address in the error or in `paper-search doctor --format text`); after applying, run `paper-search setup <KEY>` in their own terminal to enter it, then `paper-search config test <KEY>` to confirm it works. When school subscription downloads are installed and the user is at this computer, you can also run `paper-search settings <KEY>` to open the settings window for the user to fill in (when it is not installed or there is no graphical interface, it returns an error with the terminal command). Once the key is entered, rerun the original command. |
9
+ | Google Scholar returns CAPTCHA/429 or an unusual-traffic page | Scholar is a best-effort source: `0.5 RPS` by default, successful results cached, stops at once on a verification page. Wait a while, then retry with `--platform googlescholar --max-results 1`; if needed, configure an authorized `GOOGLE_SCHOLAR_PROXY_URL`. It is not in the default `--sources all` list |
10
+ | Google Scholar still unavailable, and no key wanted | Use `paper-search search "<search terms>" --sources no-key --max-results 5 --pretty` (Crossref, PubMed, Europe PMC, arXiv, OpenReview) |
11
+ | 429 rate limit | Lower `--max-results`, switch platform, or suggest configuring an optional key |
12
+ | 0 results | Broaden the keywords, use English synonyms, switch platform, or widen with `--sources` |
13
+ | Download failed | Use the unified `download_with_fallback` and report each attempt; failures involving the school's access are handled by the failure classes in `browser-download.md` |
14
14
 
15
- Scholar 相关配置:`SCHOLAR_RATE_LIMIT_RPS`(默认 `0.5`)、`SCHOLAR_MAX_RETRIES`(默认 `2`)、`SCHOLAR_TIMEOUT_MS`(默认 `15000`)。只往更保守的方向调。Scholar 用于找个别论文、补充少量检索;成批检索用 PubMed、Crossref、OpenAlex。遇到验证页就停下,过一段时间再试。
15
+ Scholar settings: `SCHOLAR_RATE_LIMIT_RPS` (default `0.5`), `SCHOLAR_MAX_RETRIES` (default `2`), `SCHOLAR_TIMEOUT_MS` (default `15000`). Only adjust them in the more conservative direction. Scholar is for finding individual papers and topping up small searches; for batch searches use PubMed, Crossref and OpenAlex. Stop at a verification page and try again after a while.
package/README.en.md DELETED
@@ -1,264 +0,0 @@
1
- <p align="center">
2
- <img src="assets/logo.svg" width="80" alt="PaperSearch logo">
3
- </p>
4
-
5
- <h1 align="center">PaperSearch</h1>
6
-
7
- <p align="center"><b>A lightweight, fully automated all-in-one literature tool for AI</b><br>
8
- One sentence and your AI searches, verifies and downloads full texts and supplementary files, all in the background.</p>
9
-
10
- <p align="center"><a href="README.md">简体中文</a> | English</p>
11
-
12
- <p align="center">
13
- <a href="https://www.npmjs.com/package/papersearch"><img src="https://img.shields.io/npm/v/papersearch?style=flat-square" alt="npm"></a>
14
- <a href="https://github.com/dr-dumpling/PaperSearch/actions/workflows/publish.yml"><img src="https://img.shields.io/github/actions/workflow/status/dr-dumpling/PaperSearch/publish.yml?style=flat-square&amp;label=publish" alt="Publish workflow status"></a>
15
- <a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/papersearch?style=flat-square" alt="Required Node.js version"></a>
16
- <a href="#1-school-subscription-downloads"><img src="https://img.shields.io/badge/school%20login-eduGAIN%20%2B%20OpenAthens-7284CE?style=flat-square" alt="School subscription downloads: academic identity federations in eduGAIN, and OpenAthens"></a>
17
- <a href="docs/guide.en.md#agent-skill"><img src="https://img.shields.io/badge/Agent%20Skill-bundled-D97757?style=flat-square" alt="Bundled Agent Skill"></a>
18
- <a href="#quick-start"><img src="https://img.shields.io/badge/platform-macOS%20%7C%20Windows-555555?style=flat-square" alt="Runs on macOS and Windows"></a>
19
- <a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-2F9E44?style=flat-square" alt="AGPL-3.0 license"></a>
20
- <a href="https://linux.do/"><img src="https://img.shields.io/badge/LINUX%20DO-community-F1A033?style=flat-square" alt="LINUX DO community"></a>
21
- </p>
22
-
23
- <p align="center">
24
- <a href="#demo-video">Demo video</a> · <a href="#quick-start">Quick start</a> · <a href="#1-school-subscription-downloads">School subscription downloads</a> · <a href="#2-api-keys">API keys</a> · <a href="docs/guide.en.md">Guide</a> · <a href="docs/ARCHITECTURE.zh.md">Architecture</a> · <a href="docs/ROADMAP.zh.md">Roadmap</a> · <a href="https://github.com/dr-dumpling/PaperSearch/issues/new/choose">Report an issue</a>
25
- </p>
26
-
27
- PaperSearch provides the `paper-search` command and a bundled Skill. Once installed, Claude Code, Codex, DeepSeek, GLM, Kimi Code, Qwen Code, CodeBuddy and other AI tools that can run local commands can do this for you:
28
-
29
- - **Search papers**: query more than 20 sources at once, including PubMed, Crossref, OpenAlex, Semantic Scholar and arXiv, with duplicates merged by DOI and DOIs verified.
30
- - **Search full-text snippets**: search the paper bodies Semantic Scholar indexes for passages on methods or results, with their sources.
31
- - **Look up journal IF and quartiles**: through EasyScholar, look up JCR impact factors, JCR quartiles and CAS zones.
32
- - **Look up citations and references**: from one paper, find the studies that cite it and the works it cites.
33
- - **Download full texts and supplementary files**:
34
- - Open-access papers: downloaded directly.
35
- - Subscription papers: through "[school subscription downloads](#1-school-subscription-downloads)" (recommended) or [API keys](#2-api-keys).
36
-
37
- <p align="center"><img src="assets/overview.en.png" width="840" alt="What PaperSearch does: search papers, full-text snippets, journal metrics, citations and references, full texts and supplementary files"></p>
38
-
39
- ## Demo video
40
-
41
-
42
-
43
-
44
-
45
- https://github.com/user-attachments/assets/6c75c5de-9dd5-42e0-9dea-f44a1b4f3aac
46
-
47
-
48
-
49
-
50
-
51
- ## Quick start
52
-
53
- ### 1. Install
54
-
55
- Send your AI tool this sentence (Claude Code, Codex, DeepSeek, GLM, Kimi Code, Qwen Code, CodeBuddy and others all work):
56
-
57
- ```text
58
- Please install the PaperSearch Skill: npx skills add dr-dumpling/PaperSearch -g -y
59
- ```
60
-
61
- On Windows the command needs Git; install [Git for Windows](https://git-scm.com/download/win) first if you do not have it.
62
-
63
- Once it is installed, mention the Skill and send:
64
-
65
- ```text
66
- /paper-search Start setup
67
- ```
68
-
69
- Your AI first asks whether to install the PaperSearch command-line program; once you agree, it installs it and then walks you through school subscription downloads and API keys.
70
-
71
- <p align="center"><img src="assets/install.en.webp" width="840" alt="Install demo: send your AI one sentence and it installs the Skill; mention the Skill and say Start setup, and it asks before installing the command-line program, lists what works, and goes on to setup"></p>
72
-
73
- ### 2. Add school subscription downloads during setup
74
-
75
- After "Start setup", your AI first asks whether to add [school subscription downloads](#1-school-subscription-downloads): full texts and supplementary files of subscription papers through your school account; it needs Chrome (installed too if missing). It installs only after you agree, then asks for your school, sets it, and opens the settings window.
76
-
77
- <p align="center"><img src="assets/config.en.webp" width="840" alt="Setup demo: say Start setup; your AI asks first, then installs school subscription downloads and Chrome and sets your school; then enter keys in the settings window and test them"></p>
78
-
79
- ### 3. Add API keys when you need them
80
-
81
- After "Start setup", your AI first asks whether you want school subscription downloads, then goes step by step down the route you pick:
82
-
83
- - **With school subscription downloads**: API keys, the download folder, waiting times and notifications all go in the settings window, and every key has a Test button. To change them later, ask your AI to open the settings, or click the gear on the capsule.
84
- - **Without**: your AI lists the missing keys and where to get them (also in [API keys](#2-api-keys)); you enter them by running `paper-search setup` in a terminal, where the input is hidden, and your AI then tests each one.
85
-
86
- ### 4. Start using it
87
-
88
- Once set up, mention the PaperSearch Skill and say what you want to search for, for example:
89
-
90
- | To do | You can say |
91
- |---|---|
92
- | Search papers | `/paper-search` Find randomized trials of SGLT2 inhibitors in heart failure since 2020, and verify the DOIs |
93
- | Search full-text snippets | `/paper-search` How did these trials define their primary endpoint? Quote a few passages |
94
- | Look up journal IF and quartiles | `/paper-search` Which journals were they published in, and what are their impact factors and quartiles? |
95
- | Look up citations and references | `/paper-search` Which studies have cited the DAPA-HF trial since it was published? |
96
- | Download full texts and supplementary files | `/paper-search` Download the full texts and supplementary files of these papers to the folder you name |
97
-
98
- **Results:**
99
-
100
- <p align="center"><img src="assets/chat-results.en.webp" width="840" alt="Results: papers, full-text passages, journal metrics and citations come back in the chat"></p>
101
-
102
- <p align="center"><img src="assets/results.en.webp" width="840" alt="Results: the chat lists the 6 papers saved and how many supplementary files each has; the download folder holds one folder per paper, supplementary files in supplements/"></p>
103
-
104
- - Search results, snippets, journal metrics and citations come back in the conversation.
105
- - Each download gets its own `YYYYMMDD-HHmmss_PaperSearchDownload` folder inside your download folder: PDFs lie directly in it; a paper whose supplementary files were saved gets a folder of its own, holding its PDF and its supplementary files (supplements/); a paper's PDF and supplementary files are done together when it is downloaded. You are told why any paper was not obtained.
106
-
107
- ## Optional setup
108
-
109
- Feature comparison:
110
-
111
- | | Works once installed | API keys | School subscription downloads |
112
- |---|:---:|:---:|:---:|
113
- | **Search** | | | |
114
- | &emsp;Search papers, citations and references | ✅ | — | — |
115
- | &emsp;More search sources and limits | — | ✅ | — |
116
- | **Journals and full text** | | | |
117
- | &emsp;Impact factors and quartiles | — | ✅ | — |
118
- | &emsp;Full-text snippets | — | ✅ | — |
119
- | **Download** | | | |
120
- | &emsp;Open-access papers | ✅ | — | — |
121
- | &emsp;Subscription papers | — | ✅ (Elsevier, Springer) | ✅ (30+ major publishers) |
122
- | &emsp;Supplementary files | — | — | ✅ |
123
-
124
- ### 1. School subscription downloads
125
-
126
- Papers the open channels cannot get can come through your school's subscriptions: the program signs in to the publishers through the academic identity federation your school belongs to, with your school account. At setup you only name your school, and you can then sign in and download non-OA papers.
127
-
128
- 1. Through the federations interconnected via [eduGAIN](https://edugain.org/), such as CARSI in China, HKAF in Hong Kong and SGAF in Singapore;
129
- 2. Schools in no national federation that have [OpenAthens](https://www.openathens.net/) access can sign in through it as well.
130
-
131
- **Supported academic identity federations**
132
-
133
- <p align="center"><img src="assets/federation-map.en.png" width="840" alt="Where school subscription downloads work: 76 countries and regions through their national academic identity federation (eduGAIN), across Asia, Europe, the Americas, Oceania and Africa; Taiwan, Thailand, the Philippines and more through OpenAthens"></p>
134
-
135
- <details>
136
- <summary>Show the federations by country (by continent and region)</summary>
137
-
138
- | Continent | Region | Supported (place: federation) |
139
- |---|---|---|
140
- | Asia | East Asia | Chinese mainland, Macau: CARSI; research institutions in the Chinese mainland: CSTCloud; Hong Kong: HKAF; Japan: GakuNin; South Korea: KAFE; Taiwan: through OpenAthens |
141
- | Asia | Southeast Asia | Singapore: SGAF; Malaysia: SIFULAN; Thailand, the Philippines and others: through OpenAthens |
142
- | Asia | South Asia | India: INFED; Sri Lanka: LIAF; Bangladesh: TIGERfed; Pakistan: PKIFED |
143
- | Asia | West Asia | Turkey: YETKİM; Saudi Arabia: Maeen; Cyprus: CyNet; Israel: IUCC; Iran: IRFED; Azerbaijan: AzScienceNet; Oman: OMREN |
144
- | Europe | Western Europe | United Kingdom: UK federation; Ireland: Edugate; France: RENATER; Netherlands: SURFconext; Belgium: Belnet; Luxembourg: eduID Luxembourg |
145
- | Europe | Northern Europe | Denmark (with Iceland and Greenland): WAYF; Sweden: SWAMID; Finland: Haka; Norway: Feide |
146
- | Europe | Central Europe | Germany: DFN-AAI; Switzerland: Switch edu-ID; Austria: ACOnet; Poland: PIONIER.Id; Czechia: eduID.cz; Slovakia: safeID; Hungary: eduId.hu |
147
- | Europe | Southern Europe | Spain: SIR; Portugal: RCTSaai; Italy: IDEM; Greece: GRNET; Malta: RiċerkaNET; Slovenia: ArnesAAI; Croatia: AAI@EduHr; Serbia: iAMRES; Montenegro: IDeduME; North Macedonia: AAIEduMk; Albania: RASH; Bulgaria: BIF; Romania: RoEduNetID |
148
- | Europe | Eastern Europe | Estonia: TAAT; Latvia: LAIFE; Lithuania: LITNET FEDI; Belarus: FEBAS; Ukraine: PEANO; Moldova: LEAF |
149
- | Americas | North America | United States: InCommon; Canada: CAF |
150
- | Americas | Central America | Mexico: FENIX |
151
- | Americas | South America | Brazil: CAFe; Chile: COFRe; Colombia: COLFIRE; Ecuador: MINGA |
152
- | Oceania | Australia and New Zealand | Australia: AAF; New Zealand: Tuakiri |
153
- | Africa | Eastern Africa | Uganda: RIF; Kenya: RAFIKI; Tanzania: TERNET IF; Malawi: MAREN; Zambia: FIDERN |
154
- | Africa | Western Africa | Nigeria: NgRENID; Ghana: GARNET; Burkina Faso: eduID.bf; Togo: eduID.tg |
155
- | Africa | Northern and Southern Africa | Morocco: eduIDM; South Africa: SAFIRE |
156
-
157
- </details>
158
-
159
- - Full names, school counts and tested schools of each federation: [federation support table](skills/paper-search/references/federation-support.md) (Chinese).
160
- - If your school cannot sign in, or you would like your school supported, [open an issue](https://github.com/dr-dumpling/PaperSearch/issues/new?template=school-login.yml) with the school sign-in template, giving the school's name and website domain, and the publisher and paper DOI where it failed.
161
-
162
- - **Your school account is enough**: no keys to apply for; publisher API keys only cover Elsevier and Springer.
163
- - **Deep publisher adaptation**: the general download flow is deeply optimized, and more than 30 publishers have dedicated rules, one by one: where the institutional login is and how to fetch the PDF and supplementary files follow each publisher as it really is, so downloads are more accurate and fewer papers are missed. The main publishers:
164
- - General: Elsevier (including Cell and The Lancet), Springer Nature (including Nature and BMC), Wiley, Oxford Academic, Taylor & Francis, Sage, PNAS, Science
165
- - Medicine: NEJM, JAMA, AHA, ASH, Wolters Kluwer, Karger, Thieme
166
- - Science and engineering: ACS, IEEE, ACM
167
- - Full list: [publisher support table](skills/paper-search/references/publisher-support.md) (Chinese)
168
- - Need another publisher? [Open an issue](https://github.com/dr-dumpling/PaperSearch/issues/new/choose) with the DOI of an article you can access; these rules are maintained and extended over time.
169
- - **Verification boxes clicked for you**: it finds and clicks human-verification boxes and carries on once the site lets it through; you are asked only when it does not pass.
170
- - **Quiet background downloads**: the browser works in the background. The progress capsule in a screen corner shows the progress; it turns amber when you need to sign in or verify, one click switches to the browser, and the download carries on once you are done.
171
-
172
- Install:
173
-
174
- ```bash
175
- paper-search school install # choose your school during installation
176
- paper-search school status --format text # check that it is ready
177
- ```
178
-
179
- **Progress capsule**
180
-
181
- <p align="center"><img src="assets/school-capsule.en.webp" width="840" alt="Progress capsule: a small capsule shows the progress, hover for each paper, minimized to the Dock it keeps downloading, one click brings it back"></p>
182
-
183
- **Verification pages**
184
-
185
- <p align="center"><img src="assets/school-verify.en.webp" width="840" alt="Verification pages: when a verification page stops the download, it passes on its own, no clicks from you"></p>
186
-
187
- **School sign-in**
188
-
189
- <p align="center"><img src="assets/school-signin.en.webp" width="840" alt="School sign-in: the institution login is clicked and your school filled in, on to your school login page"></p>
190
-
191
- **Asks when needed**
192
-
193
- <p align="center"><img src="assets/school-attention.en.webp" width="840" alt="Asks when needed: the capsule turns amber for the school login; click to switch to the browser, or skip the paper"></p>
194
-
195
- **Results**
196
-
197
- <p align="center"><img src="assets/school-finish.en.webp" width="840" alt="Results: skip a paper; the final card lists what was saved and why the rest wasn't; clicking a title opens it in your own browser"></p>
198
-
199
- ### 2. API keys
200
-
201
- Keys fall into four groups by what they are for. Get the key you need (an email needs no sign-up) and enter it any of the ways in [Quick start step 3](#3-add-api-keys-when-you-need-them).
202
-
203
- #### Recommended
204
-
205
- | Feature | Key | Where to get it |
206
- |---|---|---|
207
- | Look up impact factors and quartiles | `EASYSCHOLAR_KEY` | [EasyScholar](https://www.easyscholar.cc/) ([guide](https://docs.qq.com/aio/DTUxwZ3hUckVtZVJN), in Chinese) |
208
- | Search full-text snippets | `SEMANTIC_SCHOLAR_API_KEY` | [Semantic Scholar](https://www.semanticscholar.org/product/api) ([guide](https://docs.qq.com/aio/DTW9RdFVHc2hJUmpx), in Chinese) |
209
- | Find free full texts when downloading | `PAPER_SEARCH_UNPAYWALL_EMAIL` | No sign-up ([Unpaywall: about](https://unpaywall.org/products/api)) |
210
- | Search papers, check that DOIs are real | `CROSSREF_MAILTO` | No sign-up ([Crossref: about](https://www.crossref.org/documentation/retrieve-metadata/rest-api/tips-for-using-the-crossref-rest-api/)) |
211
-
212
- #### Subscribed full texts (optional)
213
-
214
- | Publisher | Key | Where to get it |
215
- |---|---|---|
216
- | Elsevier | `ELSEVIER_API_KEY`; off campus, subscription articles also need `ELSEVIER_INSTTOKEN` | [Elsevier](https://dev.elsevier.com/apikey/manage) |
217
- | Springer | `SPRINGER_API_KEY` | [Springer Nature](https://dev.springernature.com/) |
218
-
219
- #### More search sources (optional)
220
-
221
- | Source | Key | Where to get it |
222
- |---|---|---|
223
- | Web of Science | `WOS_API_KEY` | [Clarivate](https://developer.clarivate.com/apis) |
224
- | IEEE Xplore | `IEEE_API_KEY` | [IEEE](https://developer.ieee.org/docs/read/Searching_the_IEEE_Xplore_Metadata_API) |
225
- | ScienceDirect, Scopus | `ELSEVIER_API_KEY` (the same key as above) | [Elsevier](https://dev.elsevier.com/apikey/manage) |
226
- | Springer | `SPRINGER_API_KEY` (the same key as above) | [Springer Nature](https://dev.springernature.com/) |
227
-
228
- #### Faster, steadier search (optional)
229
-
230
- | Source | Key | Where to get it |
231
- |---|---|---|
232
- | PubMed | `PUBMED_API_KEY` | [NCBI](https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/) |
233
- | OpenAlex (all citing papers past 10,000) | `OPENALEX_API_KEY` | [OpenAlex](https://openalex.org/settings/api) |
234
- | CORE | `CORE_API_KEY` | [CORE](https://core.ac.uk/services/api) |
235
- | OpenAIRE | `OPENAIRE_API_KEY` | [OpenAIRE](https://develop.openaire.eu/) |
236
-
237
- Settings are saved in `~/.config/paper-search-cli/config.json`, readable only by you. The download folder, proxy, automatic updates and other settings are in [Guide · Other settings](docs/guide.en.md#other-settings).
238
-
239
- ## More documentation
240
-
241
- The [guide](docs/guide.en.md): [command examples](docs/guide.en.md#command-examples), [how it works](docs/guide.en.md#how-it-works), [search sources](docs/guide.en.md#search-sources), [Agent Skill](docs/guide.en.md#agent-skill), [all commands](docs/guide.en.md#all-commands), [troubleshooting](docs/guide.en.md#troubleshooting). `paper-search tools --pretty` lists every tool and its parameters in the terminal.
242
-
243
- The [changelog](CHANGELOG.md) (in Chinese) lists every version under the same seven aspects: setup, search and checks, open download, school subscription download, progress window, download results and documentation.
244
-
245
- ## Roadmap
246
-
247
- Next on the list:
248
-
249
- 1. **A better progress capsule**: better-timed reminders, with no early prompt when the school login page lets you through by itself; less of the browser briefly jumping to the front on Windows when it starts or changes pages; a cleaner look.
250
- 2. **Parallel downloads**: papers from different publishers download at the same time, cutting the total time for dozens or hundreds of papers; each publisher's download limits still apply.
251
- 3. **Better paper search and full-text snippets**: learn from similar tools and improve how papers and passages are found.
252
-
253
- The full plan is in the [roadmap](docs/ROADMAP.zh.md) (Chinese); how it works inside is in the [architecture](docs/ARCHITECTURE.zh.md) (Chinese). Feature ideas are welcome as [issues](https://github.com/dr-dumpling/PaperSearch/issues/new/choose) and pull requests; for failed downloads or publisher requests use the matching issue template, and to add publisher rules yourself see [school/CONTRIBUTING.md](school/CONTRIBUTING.md).
254
-
255
- ## Acknowledgements
256
-
257
- - Thanks to the [LINUX DO community](https://linux.do/): the command-plus-Skill approach and workflow improvements came from discussion and open sharing there.
258
- - [openags/paper-search-mcp](https://github.com/openags/paper-search-mcp): the project draws on its ideas, reworked into a standalone command.
259
- - [Dianel555/paper-search-mcp-nodejs](https://github.com/Dianel555/paper-search-mcp-nodejs) (MIT): the command started as an adaptation of its Node.js implementation.
260
- - [Rimagination/scansci-pdf](https://github.com/Rimagination/scansci-pdf) (MIT): the institutional download backend (`school/`) draws on its architecture (CARSI and other federation sign-in, publisher site capture, session reuse, PDF capture).
261
-
262
- ## License
263
-
264
- [AGPL-3.0](LICENSE), with a commercial license available.