From the collection
cquarry
A canonical Python package providing read-only access to Calibre’s metadata.db and a full parser for Calibre’s search expression grammar.
This library powers CalibreQuarry (CLI/TUI), Hermitage (GTK4 Desktop Gallery), bindery-cli (EPUB repair tool), and Carrel (Web Reader), so Virtual Library definitions and search queries evaluate identically across all frontends.
It implements a recursive-descent parser that matches Calibre’s native search capabilities (exact matches, substring, boolean logic, date math, custom columns, identifiers, and nested virtual libraries), bypassing Calibre’s heavy Python initialization overhead.
The 1.24-1.26 parity program carried the write side to the same completeness: restore-from-trash verbs that rebuild rows from Calibre’s own .caltrash sidecar OPFs, custom-column schema and metadata edits, a restricted tag browser, and the four shared helpers (ordered virtual-library names, tag rollups, unpipe_author, the canonical identifier table) that Hermitage and Carrel-calibre-web adopted in the same week, so every frontend inherits the same fixes at once.