This README is also available in: 🇨🇳 简体中文 | 🇬🇧 English.
This repository provides information of several Zotero plugins and their XPI packages , in an attempt to provide a centralized plugin store service until the official Zotero plugin store is ready.
- Main domain of Zotero Chinese: https://zotero-chinese.com/plugins/
- GitHub Pages: https://zotero-chinese.github.io/plugins/
Note
How to add a plugin that hasn't been included?
Edit src/plugins.ts
, and add an object to the plugins
list in the following format. Existing entries can serve as references.
When adding, please sort by repo
.
After editing, commit and pull request. We will process it as soon as possible.
interface PluginInfo {
/**
* Repository of plugin
*
* Example: northword/zotero-format-metadata
*
* Note: no `/` at the beginning or end
*/
repo: string
/**
* Release information of the plugin
*/
releases: Array<{
/**
* Zotero version for this release, "7" or "6"
*/
targetZoteroVersion: string
/**
* Download channel for this release
*
* `latest`: Latest official release;
* `pre`: Latest pre-release;
* `string`: Corresponding `git.tag_name` of the release;
* Note that some `git.tag_name` have `v` while others do not, you can check the release link to determine.
*/
tagName: 'latest' | 'pre' | string
}>
}
Before starting development, you need to create a GitHub personal access token and store it in the local environment variable GITHUB_TOKEN
.
# Clone the repository
git clone https://github.com/northword/zotero-plugins.git zotero-plugins
cd zotero-plugins
# Install dependencies
npm install -g pnpm
pnpm install
# Fetch plugin information
pnpm data:info
# Fetch chart information
pnpm data:chart
src/index.ts
is the main logic script, which performs the following actions:
- Iterates through the plugin information list, fetches basic information and releases for each plugin from GitHub, and saves the obtained information in
dist/plugins.json
- Saves the XPI packages in
dist/xpi/${github.release.asset.id}.xpi
The GitHub Action Bot periodically runs the src/index.ts
script, performs the above steps, and deploys the dist/
to the gh-page
branch.
Note
How to use this project as a dependency for secondary development?
Developers can use the dist files like dist/plugins.json
from the gh-pages
branch.
Thanks to the Zotero community and developers for their contributions!
This project uses the following proxies or public CDN services for XPI distribution:
- GitHub Proxy: https://github.com/hunshcn/gh-proxy
- JsDeliver: https://www.jsdelivr.com/
- KGitHub: https://help.kkgithub.com/
This project is a TypeScript reimplementation of l0o0/ZoteroPlugins.
This project is deployed on GitHub Pages and Netlify.
MIT License