Print the subject hierarchy as a tree on cards, remove the QR code
Each card now shows, under the call number, the Library of Congress outline levels for its class (from the published outline, down to the narrowest range) followed by the place or topic from the catalogue record's subject heading, one level per line. Existing books get the subject part filled in by a background job at startup that changes nothing else about them. The QR code and everything that read it are removed; the subjects line on the card is replaced by the tree. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
c9b2c2e8c9
commit
7ae1bcef0a
46 files changed
+8591
-545
No files matched your search
@@ -35,15 +35,3 @@ export function acceptRead(
|
||||
export function markEmitted(state: ReadState, isbn: string, now: number): ReadState {
|
||||
return { ...state, emittedAt: { ...state.emittedAt, [isbn]: now } };
|
||||
}
|
||||
|
||||
/** A card's QR code, repeat-protected like an ISBN: once per REPEAT_MS per distinct text. */
|
||||
export function acceptCard(state: ReadState, text: string, now: number): { state: ReadState; emit: string | null } {
|
||||
const key = 'card:' + text;
|
||||
const last = state.emittedAt[key];
|
||||
if (last !== undefined && now - last < REPEAT_MS) return { state, emit: null };
|
||||
return { state: { ...state, emittedAt: { ...state.emittedAt, [key]: now } }, emit: text };
|
||||
}
|
||||
|
||||
export function markCardEmitted(state: ReadState, text: string, now: number): ReadState {
|
||||
return { ...state, emittedAt: { ...state.emittedAt, ['card:' + text]: now } };
|
||||
}
|
||||
Reference in new issue
Block a user