summaryrefslogtreecommitdiff
path: root/tinyusb/common/errors.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-08-18 15:28:58 +0700
committerhathach <[email protected]>2026-08-18 16:58:58 +0700
commitf59c8948729debc6d57c4dfade5486176468edbf (patch)
tree4090122073c645ab5c73cf58cb01075950a2f88f /tinyusb/common/errors.h
parent11bdbc3eac085e4a946e25a8a614bcbf62e41fa2 (diff)
skill(read-doc): search the Calibre database instead of the filesystem
Finding documents by walking the library tree misses anything the filename does not carry - Calibre stores only a truncated title and the author there, so the tags, series, publisher and description that hold most part numbers and errata IDs are invisible to it. A zero-result tree search then reads as "the document does not exist" rather than as a bad search; that happened here, and led to a confident claim that a fully populated 14,000-file library was empty. search.py queries metadata.db, ANDs its keywords across every metadata field (including the stored filename), and prints the best matches first with the exact path to read. Matching is NFKC + casefold, so a typed ASCII apostrophe or mu reaches the titles that store the typographic ones. Every printed path is checked on disk. Calibre renames <author>/<title> (<id>) when metadata is edited and leaves the old directory behind, so a miss retries by the stable book id before reporting MISSING - which distinguishes "the file is not here right now" from "no such document". The gate tests for metadata.db rather than the directory, since an unmounted or half-synced mountpoint is still a directory. Consumers that prescribed their own tree search - driver-reviewer, port-dev, the driver-review workflow, and the calibre-library references in CLAUDE.md, usbtest, etm-trace and target-debug - now point at the skill, which owns the library's location.
Diffstat (limited to 'tinyusb/common/errors.h')
0 files changed, 0 insertions, 0 deletions