Repository navigation
Conversation
Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add local Zotero as literature query and paper retrieval database
Add Zotero as a literature search and retrieval database
Oct 12, 2026
Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a read-only
Zoterobackend, built onpyzotero, so a user's own Zotero library (zotero.org or the local desktop app) can be searched for literature and used for paper retrieval. It implements the same interfaces asEuropePMC.literature/databases/zotero.py)GetID,GetMetadata,GetAbstract,GetPDFandGetPublication.library_id,library_type,api_key,collection,localandfull_text_search.local=Truedefaultslibrary_idto 0 and rejects group libraries. A remote client withoutlibrary_idraisesValueError.extra), then the Zotero item key.tablesandfigure_descriptionsare empty because Zotero has no JATS XML.storage/<id>.{txt,pdf}./and other unsafe characters in IDs (DOIs) are replaced with_.aoptk[zotero](pyzotero>=1.15.2), imported lazily.pyzotero, and constructingZoterowithout it raises an actionableImportError.uv.lockis regenerated, and the CI test job now syncs with--extra zotero.Queryfiltersfull_text_subset,only_preprint,exclude_preprint,licensinganddateraiseNotImplementedError.dateraises because the tuple's semantics (exact date vs. range) are unclear. This is a candidate for a client-side filter if wanted.tests/test_zotero_mocked.pyuses a fake client and needs no network orpyzotero.zotero_localpytest marker, reserved for future local-API tests.Not included: gated integration tests against a real or local Zotero, and an example script. The code has only been exercised against the fake client.