How fdossi/zotfetch works
ZotFetch is a Zotero plugin for batch PDF acquisition. Its main workflow extracts identifiers from selected library items, builds ordered source candidates, resolves landing pages to validated PDF URLs, then imports the PDF as an attachment; batch modes also support retries and live progress. Separate capabilities include publisher-specific and browser-based extraction, proxy/CAPES access, request pacing and challenge protection, and preferences. The README documents several source routes and extraction behaviors whose detailed wiring was not sampled; those are represented at subsystem level.
Main entry points: fetch.mjs Batch orchestration · pdf-resolvers.mjs PDF resolver dispatch · ui.mjs Commands and progress · source-resolvers.mjs Source candidates
Components 20
Zotero interaction
- Commands and progress
chrome/content/ui.mjs
Acquisition pipeline
- Batch orchestration
chrome/content/fetch.mjs - Identifier extraction
chrome/content/identifiers.mjs - DOI recovery
chrome/content/fetch.mjs - Source candidates
chrome/content/source-resolvers.mjs - OA lookup services
- Proxy and CAPES routes
chrome/content/source-resolvers.mjs - Attachment import
chrome/content/importer.mjs
PDF resolution
- PDF resolver dispatch
chrome/content/pdf-resolvers.mjs - Publisher extraction rules
chrome/content/pdf-resolvers.mjs - Generic HTML extraction
chrome/content/pdf-resolvers.mjs - Hidden browser
chrome/content/pdf-resolvers.mjs - PDF validation
chrome/content/pdf-resolvers.mjs
Network resilience
- Safe network requests
chrome/content/utils.mjs - Rate limiting
chrome/content/cooldown.mjs - Challenge protection
chrome/content/protected-hosts.mjs
Preferences
- Preference services
chrome/content/prefs.mjs - Preferences dialog
chrome/content/prefs-dialog.js
Other components
- Library user
- Zotero host
Connections 21
- Library user → Commands and progress: selects commands
README.md - Commands and progress → Batch orchestration: starts batches
README.md - Batch orchestration → Identifier extraction: extracts identifiers
chrome/content/fetch.mjs - Batch orchestration → DOI recovery: recovers DOI
chrome/content/fetch.mjs - Batch orchestration → Source candidates: builds candidates
chrome/content/fetch.mjs - Source candidates → OA lookup services: queries sources
README.md - Batch orchestration → Proxy and CAPES routes: tries proxy routes
README.md - Batch orchestration → PDF resolver dispatch: resolves candidates
chrome/content/fetch.mjs - PDF resolver dispatch → Publisher extraction rules: applies rules
README.md - PDF resolver dispatch → Generic HTML extraction: extracts links
README.md - PDF resolver dispatch → Hidden browser: loads rendered pages
README.md - PDF resolver dispatch → PDF validation: validates PDF
README.md - Batch orchestration → Attachment import: imports resolved PDF
chrome/content/fetch.mjs - PDF resolver dispatch → Safe network requests: requests documents
chrome/content/pdf-resolvers.mjs - Source candidates → Safe network requests: requests source data
chrome/content/source-resolvers.mjs - Batch orchestration → Rate limiting: checks request timing
chrome/content/fetch.mjs - Batch orchestration → Challenge protection: checks host policies
chrome/content/fetch.mjs - Commands and progress → Preference services: opens settings
README.md - Preferences dialog → Preference services: reads and saves
chrome/content/prefs-dialog.js - Batch orchestration → Commands and progress: reports progress
README.md - Zotero host → Attachment import: provides library
README.md