Add QR codes to cards, stop inventing call number parts

Cards now carry a QR code holding the book's own record (call number,
title, authors, ISBN, year), and the scanner reads it back to find or
add that book.

Call number selection no longer pads catalogue numbers with generated
cutters. A number is "exact" only when it comes verbatim from a record
for this edition; a bare class is a hint that steers the other-edition
and similar-books lookups; a record fetched by LCCN must list the
book's ISBN to count as this edition. "Look up again" bypasses every
cached result, and shelf order breaks ties by author then title.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-19 12:53:12 -07:00
1 parent 6cec404e21
commit ad2956e868
56 files changed
+4020 -156

No files matched your search

+2 -1
View File
@@ -2,11 +2,12 @@ import { cardLines, parseCallNumber } from '../../shared/callnumber.ts';
export const APPROX_TIP = 'Number borrowed from another edition';
export const SIMILAR_TIP = 'Number borrowed from similar books';
export const CARD_TIP = 'Number read from its card, marked approximate there';
/** A call number in two monospaced lines, the way it is printed on the card. `~` marks an approximate one. */
export function CallNo({ value, approximate, source, large }: { value: string | null; approximate?: boolean; source?: string | null; large?: boolean }) {
const similar = source === 'similar';
const tip = similar ? SIMILAR_TIP : APPROX_TIP;
const tip = similar ? SIMILAR_TIP : source === 'card' ? CARD_TIP : APPROX_TIP;
const cls = 'callno' + (large ? ' callno-large' : '');
if (!value) return <span class={cls + ' callno-none'} aria-label="No call number yet">–</span>;
const cn = parseCallNumber(value);