Bartleby the Librarian

Bartleby is a fallback for Zotero when translators fail, enriching PDFs with structured metadata, tags, and an `[AI Enriched]` audit trail.
Bartleby the Librarian cover graphic
Bartleby the Librarian for Zotero 7.
Bartleby sends the first 9,000 characters of a PDF or webpage to OpenAI and attempts to conform the result to Zotero's item schema—distinguishing a Statute from a Book, a Law Review Article from a Report. It also adds tags, restricting the model to tags already in your library.
A raw PDF being converted into a Zotero Law Review Article
Bartleby builds a parent item and fills bibliographic fields.
In use, a progress bar appears with the tagline "I would prefer not to..." before Bartleby parses the text, builds a Parent Item, and stamps the record. A recursion guard ensures it doesn't loop on its own output. It does the job—reluctantly, but well.
Update, July 2026 — v2. Auditing 360 enriched items turned up a quiet failure: for statutes, cases, bills, and hearings, Bartleby extracted the title correctly and then dropped it. Zotero stores a statute's title as `nameOfAct` and a case's as `caseName`, and the old field check tested the base name, silently discarding everything but `shortTitle`. Tags had never applied either, in any of those 360 runs. v2 is a rewrite with tests:
  • Field mapping resolved through Zotero's base-field table, so legal item types keep their titles and dates
  • A preview of every proposed change before anything is written—apply all, fill empty fields only, or cancel
  • Paste a front page from the clipboard, or keep it in a `bartleby:` child note, for scans whose OCR is mangled
  • Bot-check pages are detected and refused instead of being catalogued as the document
  • OCR for scans with no text layer, via `ocrmypdf`, opt-in because it costs about 40 seconds
  • Identifiers mined from the filename and URL—`s00253-008-1698-5.pdf` is a Springer DOI, `book_9780262374095.pdf` an ISBN—and resolved against CrossRef, OpenAlex, and OpenLibrary, skipping the model entirely
  • Files pulled from Zotero storage on demand, which turned out to matter: only 41 of my 5,948 imported PDFs were actually on disk
  • Duplicate warnings, and stamps written only on success, so a quota error no longer lands in the item's Extra field
Filed under
  • tooling
  • zotero
  • AI