|
| 1 | +# Zotero Plugin Registry |
| 2 | + |
| 3 | +> A self-hosted registry and store for Zotero plugins based on their `update.json` manifests. |
| 4 | +
|
| 5 | +## Overview |
| 6 | + |
| 7 | +Zotero Plugin Registry is a self-hosted platform that aggregates Zotero plugins by collecting developers' self-hosted `update.json` files. |
| 8 | +It provides a unified service for users to browse, search, and get version and compatibility information about Zotero plugins. |
| 9 | + |
| 10 | +## Project Structure |
| 11 | + |
| 12 | +```plain |
| 13 | +main/ |
| 14 | +└── plugins/ |
| 15 | +└── <plugin-id>/ |
| 16 | + ├── meta.json # Base plugin metadata (manually maintained) |
| 17 | + ├── meta.generated.json # Generated metadata including versions |
| 18 | + ├── latest.json # Generated latest version info |
| 19 | + └── icon.png # Optional plugin icon |
| 20 | +scripts/ |
| 21 | +└── build.ts # Build script to generate aggregated data |
| 22 | +.gitignore # Ignore generated JSON files |
| 23 | +package.json # Project config and dependencies |
| 24 | +README.md # This document |
| 25 | +``` |
| 26 | + |
| 27 | +## Quick Start |
| 28 | + |
| 29 | +1. Clone the repository and install dependencies |
| 30 | + |
| 31 | + ```bash |
| 32 | + git clone https://github.com/zotero-plugin-dev/zotero-plugin-registry.git |
| 33 | + cd zotero-plugin-registry |
| 34 | + pnpm install |
| 35 | + ``` |
| 36 | + |
| 37 | +2. Add plugin metadata in `main/plugins/<plugin-id>/meta.json`, example: |
| 38 | + |
| 39 | + ```json |
| 40 | + { |
| 41 | + |
| 42 | + "name": "Zotero Format Metadata", |
| 43 | + "update_json": "https://example.com/path/to/update.json", |
| 44 | + "description": "A useful Zotero plugin.", |
| 45 | + "homepage": "https://github.com/northword/zotero-format-metadata", |
| 46 | + "tags": ["metadata"] |
| 47 | + } |
| 48 | + ``` |
| 49 | + |
| 50 | +3. Run the build script to generate aggregated data |
| 51 | + |
| 52 | + ```bash |
| 53 | + pnpm run build |
| 54 | + ``` |
| 55 | + |
| 56 | +4. After building, `meta.generated.json` and `latest.json` files will be created inside each plugin directory, ready for deployment or frontend consumption. |
| 57 | + |
| 58 | +## Build Script Usage |
| 59 | + |
| 60 | +- Build all plugins: |
| 61 | + |
| 62 | +```bash |
| 63 | +pnpm run build |
| 64 | +``` |
| 65 | + |
| 66 | +- Build a specific plugin by ID: |
| 67 | + |
| 68 | +```bash |
| 69 | +pnpx ts-node scripts/build.ts --only [email protected] |
| 70 | +``` |
| 71 | + |
| 72 | +## Contributing |
| 73 | + |
| 74 | +Contributions of plugin metadata files are welcome! |
| 75 | +Please keep the repository clean and comply with the MIT license. |
| 76 | + |
| 77 | +## License |
| 78 | + |
| 79 | +MIT © Northword |
| 80 | + |
| 81 | +## Contact |
| 82 | + |
| 83 | +For questions or suggestions, please open an issue on GitHub. |
0 commit comments