一键导入
verify-translator
// Verify a Zotero translator after every addition or modification, and before submitting a PR. Runs linting, tests, and metadata updates.
// Verify a Zotero translator after every addition or modification, and before submitting a PR. Runs linting, tests, and metadata updates.
Analyze a website's API by capturing network traffic (HAR) and generating an OpenAPI spec via mitmproxy2swagger.
Create or update test cases for a Zotero translator by running it against live URLs and capturing the output.
Develop an export translator that converts Zotero items into a file format (JSON, XML, CSV, etc.).
Develop an import translator that parses a file format (JSON, XML, RIS, BibTeX, CSV, etc.) into Zotero items.
Develop a search translator that looks up items by identifier (DOI, ISBN, PMID, arXiv ID, etc.) via an external API. NOT for websites with search pages — use develop-web-translator for those.
Develop a web translator that scrapes bibliographic data from a website. This is the most common translator type.
| name | verify-translator |
| description | Verify a Zotero translator after every addition or modification, and before submitting a PR. Runs linting, tests, and metadata updates. |
Fetch and read:
lastUpdatedThis must be done every time translator code is modified. Zotero uses lastUpdated to determine when to push updates to users.
node .bin/update-metadata.mjs "<translator filename>"
npm run lint -- "<translator filename>"
Use --fix for auto-fixable errors. Fix any remaining errors manually.
node .bin/run-tests.mjs "<translator filename>"
This launches headless Chromium with the Zotero Connector extension and runs the translator's test cases against live sites.
All tests must pass. If a test fails:
create-test skill).git branch --show-current
If on master, create a new branch.
Guide the user through creating a PR on https://github.com/zotero/translators. Keep the description concise. Encourage the user to write/review the description.