feat: ingest BookOrbit annotations as chapter entries #47
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
BookOrbit (books.notsosm.art, v3.6.0) holds 234 annotations across 511 books. None of it is visible to knox, so recall about books I have actually read is empty.
Source
The export endpoint is the contract to use; the Postgres schema is not.
POST /api/v1/auth/loginwith{username, password}→accessToken(15 min TTL, login throttled to 3/min)GET /api/v1/annotations/export?format=json→ the whole hub, no pagination cap (server-sidefindHubAll)id, bookId, bookTitle, chapterTitle, text, note, color, style, origin, page, cfi, xpointer, highlightedAt, createdAtDesign (agreed)
internal/ingest/bookorbit.go,SourceID: "bookorbit".~/.config/knox/bookorbit.env(0600), loaded likekarakeep.env.Note:+<sub>origin, date</sub>, mirroring BookOrbit's own export.sha256("bookorbit:<bookId>:<chapter>"), with an ordinal when a book repeats a chapter title.ContentHashover the rendered body: a new highlight updates the entry and appends a log version instead of duplicating it.CreatedAt= latest highlight in the chapter;Project= author; provenance carriesbook_id,chapter,annotation_ids.LocalSourcesEnabled()path (the server node runsKNOX_LOCAL_SOURCES=noneand must stay a pure replica).Verification
httptestcovering login + export, grouping, fingerprint stability, content-hash change when a highlight is added, and 401 surfacing as an error.knox_countshows thebookorbitsource and a known highlight is findable viaknox_search.Out of scope
Auto-thread per book (blocked behind #42's non-deterministic threader).
Live verification done after the credentials landed.
knox_count "Repeat Room"reports 2bookorbithits, andknox_searchreturns the chapter titles.Watcher restarted on the new binary; the 30-minute tick now runs with the fix.