Static frontend for browsing a Zotero library with an image-heavy grid similar to the Zotero web app.
- Duplicate your Zotero Web API credentials:
- Find the numeric user or group ID (e.g. from https://www.zotero.org/settings/keys).
- Create an API key with at least
readaccess to the library and file attachments.
- Edit
src/config.jsand fill in:LIBRARY_TYPE:"users"(default) or"groups".LIBRARY_ID: your Zotero numeric ID.API_KEY: required for private libraries and to stream attachment files (cover images).COLLECTION_KEY(optional): limit the view to a single collection key (e.g.H4STB4UH).
- The helper Python scripts ship with a read-only Zotero API key baked in. Update the
ZOTERO_API_KEYconstant inzotero_images.py,zotero_abstracts.py, orzotero_tags.pyif you want to target a different library. - Serve the project with any static server so ES modules load correctly, for example:
or open
npx http-server .index.htmlwith your favourite live-server extension.
The grid loads the first 100 top-level items, fetches their attachment children, and uses the first image attachment as a cover. If no attachment is available, the card shows a fallback initial.
A collection of Python scripts in py_scripts/ to automate Zotero library management, enrichment, and cleanup.
-
Install dependencies:
cd py_scripts python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
-
Configure environment: Copy
.env.exampleto.envin the rootbabel/directory (or create it) and fill in your details:ZOTERO_USER_ID="your_user_id" ZOTERO_API_KEY="your_api_key_read_write" LIBRARY_TYPE="user" # or "group" COLLECTION_KEY="" # Target collection key (optional) TARGET_ITEM_TYPE="book" # Ollama Configuration OLLAMA_URL="http://localhost:11434" OLLAMA_MODEL="minimax-m2:cloud" OLLAMA_TIMEOUT=60 OLLAMA_TEMPERATURE=0.3
| Script | Description |
|---|---|
zotero_abstracts.py |
Generates book abstracts in Spanish using Ollama LLM and search context, saving them to the abstractNote field. |
zotero_aquileo.py |
Automatically finds winners of the "Premio Aquileo J. Echeverría" (Cuento) and adds their books to the target collection. |
zotero_nobel_winners.py |
Automatically finds Nobel Prize in Literature winners and adds a representative book for each to the target collection. |
zotero_enrich.py |
Analyzes books to generate tags, genres, and keywords using an LLM. Also creates dc:relation links between similar items. |
zotero_tags.py |
Generates 3-6 thematic tags for books using an LLM and adds them to Zotero. |
zotero_metadata_fixer.py |
Uses search results and LLM to correct metadata errors (split author names, fix dates/publishers) and fill missing fields. |
zotero_original_dates.py |
Finds the original publication date for classic works and adds it to the Extra field as original-date: YYYY. |
zotero_images_duckduckgo.py |
Searches DuckDuckGo Images for book covers and attaches them as linked URLs (Book Cover (Web)). |
zotero_images_google_books.py |
Searches Google Books API for high-res covers and attaches them as linked URLs. |
zotero_covers_to_b64.py |
Downloads linked cover images, resizes/compresses them, stores them as a Base64-encoded note, and deletes the original link. |
Run any script from the py_scripts directory:
python zotero_abstracts.py- Responsive cover grid inspired by the provided screenshot.
- Search-as-you-type across titles and creators.
- Collection dropdown populated from the Zotero API.
- Attachment lookups with concurrency control so cover images appear automatically.
- Inline toast messaging for API errors.
- Rich item drawer with info/notes/tags/attachments/related tabs, including live data pulled from Zotero on demand.
Consider adding pagination, lazy-loading to support larger libraries, and richer metadata flyouts (abstract, tags, notes). The toast component is intentionally minimal; wiring it to specific edge cases (invalid key, quota exceeded) would improve the UX. Finally, storing configuration outside the repo (e.g. config.local.js) avoids accidental key commits if the project becomes public.