Skip to content

XLGLJX/Zotero-Shanbay

Repository files navigation

Zotero Shanbay

中文 | English

中文

Zotero Shanbay 是一个 Zotero Reader 插件,用于在阅读论文或 PDF 时将选中的英文单词添加到扇贝生词本。

功能

  • 在 Zotero Reader 中选中英文单词后显示扇贝释义。
  • 一键将单词添加到扇贝个人生词本。
  • 支持 Zotero 7、8、9。
  • 支持内置扇贝登录页获取登录态。
  • 提供备用 auth_token 登录方式。
  • 对短语或句子不展示插件内容,避免干扰 Zotero 原生划词工具。

安装

  1. 从构建产物或 Release 下载 zotero-shanbay.xpi
  2. 打开 Zotero。
  3. 进入 Tools -> Add-ons
  4. 选择 Install Add-on From File...
  5. 选择 zotero-shanbay.xpi 并重启 Zotero。

使用

  1. 打开 Zotero 设置中的 Zotero Shanbay 面板。
  2. 点击 内置登录扇贝 并完成登录。
  3. 登录成功后回到 Zotero 设置页,点击 检测登录状态。插件不会自动关闭登录窗口,也不会自动刷新登录状态。
  4. 如果内置登录不可用,可以从浏览器中复制扇贝 Cookie 的 auth_token,粘贴到备用登录输入框并保存。
  5. 打开 Zotero Reader。
  6. 选中单个英文单词。
  7. 在弹出的 Zotero 划词工具中查看释义,并点击 添加到扇贝

开发

npm install
npm run build

构建后的 XPI 位于:

.scaffold/build/zotero-shanbay.xpi

致谢

特别感谢 honwhy/shanbay-ext

本项目的扇贝 API 调用实现、功能思路和交互灵感主要来源于该项目;插件 Logo 也继承自 shanbay-ext 项目的视觉素材。shanbay-ext 是浏览器端扇贝单词助手,本项目则将其中与扇贝生词本相关的能力迁移到 Zotero Reader 场景中。

同时感谢:

说明

扇贝相关接口并非官方公开 API,未来如果扇贝调整接口或鉴权方式,插件可能需要同步更新。

English

Zotero Shanbay is a Zotero Reader plugin for adding selected English words from papers or PDFs to your Shanbay vocabulary book.

Features

  • Show Shanbay definitions when a single English word is selected in Zotero Reader.
  • Add the selected word to your personal Shanbay wordbook with one click.
  • Support Zotero 7, 8, and 9.
  • Support built-in Shanbay login for obtaining the session cookie.
  • Provide a fallback auth_token login option.
  • Hide all plugin UI for phrases or sentences to avoid interfering with Zotero's native text-selection tools.

Installation

  1. Download zotero-shanbay.xpi from the build output or Releases.
  2. Open Zotero.
  3. Go to Tools -> Add-ons.
  4. Choose Install Add-on From File....
  5. Select zotero-shanbay.xpi and restart Zotero.

Usage

  1. Open the Zotero Shanbay pane in Zotero preferences.
  2. Click Built-in login and sign in to Shanbay.
  3. After signing in, return to Zotero preferences and click Check status. The plugin does not automatically close the login window or refresh the login status.
  4. If the built-in login is unavailable, copy the auth_token cookie from a logged-in Shanbay browser session, paste it into the fallback login field, and save it.
  5. Open Zotero Reader.
  6. Select a single English word.
  7. Review the Shanbay definition in the selection popup and click Add to Shanbay.

Development

npm install
npm run build

The generated XPI is located at:

.scaffold/build/zotero-shanbay.xpi

Acknowledgements

Special thanks to honwhy/shanbay-ext.

The Shanbay API implementation, product idea, and interaction inspiration of this project are largely derived from that project. The plugin logo is also inherited from the visual assets of shanbay-ext. While shanbay-ext is a browser-based Shanbay helper, this project brings the Shanbay wordbook workflow into Zotero Reader.

Thanks also to:

Notes

The Shanbay endpoints used by this plugin are not official public APIs. If Shanbay changes its API or authentication flow, this plugin may need updates.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors