Skip to content

BookOrbit: the Catalog says Collections, SmartScope and BookOrbit - #367

Merged
9retirement6irk merged 46 commits into
mainfrom
fix/bookorbit-catalog-names
Nov 23, 2026
Merged

9retirement6irk merged 46 commits into
mainfrom
fix/bookorbit-catalog-names

Conversation

@9retirement6irk

Copy link
Copy Markdown
Owner

The Catalog's wording with BookOrbit, from the owner's first try on a Scribe. Built on #366 (merge #347 to #366 first, in number order).

What changes for the user

Signed in to BookOrbit:

  • The Catalog's Shelves card and list are called Collections. The list already held BookOrbit's collections and its SmartScopes; the SmartScopes are now marked SmartScope (they said "smart shelf").
  • Texts that named Grimmory name BookOrbit: Fetching from BookOrbit… while a list loads, Refresh list from BookOrbit, a book's missing description, the Audiobooks tab's source line, the "different copy" question and the "can't be synced" message, and the Rebuild library help.

With Grimmory everything reads as before.

How

gzreader_servername.lua (new, small): Name.get(), Name.fix(text), Name.shelves(), Name.smart(), by the server signed in to. The texts pass through it where they're shown.

Not covered here: Settings rows and menus that say Grimmory as a name of the feature (e.g. "Grimmory: connect with QR code" in the gesture list). Say if you want those to follow the server too.

Tested

Full suite: 0 suites failed. Plugin harness 2878 passed (the names for each server, the list's title and SmartScope mark, and a check that the Catalog's two screen files have no Grimmory-named text left that doesn't follow the server).

To try on a device

Signed in to BookOrbit: open the Catalog. The card reads Collections; open it: your collections, and SmartScopes marked as such. While a list loads it says Fetching from BookOrbit….

Not labelled beta, as asked for the BookOrbit PRs.


Generated by Claude Code

The stand-in the BookOrbit work is tested against: the KOReader sign-in,
version and capabilities, catalog, covers, downloads, match-check, progress
(plugin and KOSync), and the main API's key, audiobook manifest, audio files
and listening position. Written from BookOrbit's routes and field names at
commit e60ab43; none of its code is copied.

tools/gzreader/bookorbit-probe.py asks a real server the same questions and
prints status codes and field names only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
A second client with the Grimmory client's methods (gzreader_bookorbit.lua),
answering in the shapes the Catalog, the index, covers and downloads already
read. plugin.api stays the same table; its class changes with the sign-in
(store.backend). Sign-in is BookOrbit's KOReader sync user: only the
password's MD5 is kept (with the other secrets, off the USB drive).

Nothing is sent to BookOrbit yet (books_only): progress, highlights,
bookmarks, statistics, shelves and audiobooks come in their own steps.

Each server has its own book ids: the other server's list of downloads is
put aside (the files stay), and covers are kept in separate folders.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
Grimmory, BookOrbit, or on its own (books sent from a browser). The page
after it offers what fits the answer: the setup page with that server picked,
typing its sign-in, or the Send books page. The guide's sync page says what
is true for the answer. The answer is kept (store.book_source) as the guide's
default; it switches nothing off.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
…g, emulator check)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
… guide's first question

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
run.sh's sections are rewritten by #321, so a new suite there kept this out
of the test build.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
… of run_tests.lua

Other open PRs add their blocks at the end of the file, which kept this out
of the test build.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
…icates when Python has none

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
…er's does

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
A real server (v3.9.0) lists a book's main file as "primary", not "content":
with only "content" accepted, no book would have downloaded.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
…rprint

Progress goes out by the file's fingerprint (KOReader's partial MD5) with
KOReader's own percentage and XPointer, and comes back from the book's
catalog record in the shape gzreader_sync.lua already reads. Books in the
folder that aren't tied to a BookOrbit book are matched with match-check.

What the server takes is in the client's `supports` (main's serverCan);
one sentence built from it says what is and isn't synced, wherever shown.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
gzreader_bo_annotations.lua speaks BookOrbit's exchange: the keys of every
highlight in the book, the ones new or changed since the last exchange, and
back what this Kindle lacks (add, edit, delete), acknowledged once applied.
Same interface as the Grimmory module; main picks by book server.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
gzreader_bo_bookmarks.lua speaks BookOrbit's bookmark exchange (keys of the
book's bookmarks, the new ones, and back what to add and remove; a bookmark
BookOrbit gives is dated here and acknowledged with its key). Only when the
server advertises bookmarkSync. Same interface as the Grimmory module.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
List (books/query), details and chapters (the manifest), download with
resume (asset content, Range), and the listening position both ways
(playback-state, with its revisions and a fresh operation id), all in the
shapes gzreader_audiobook.lua reads Grimmory's in. An audiobook's id here is
"a<id>": a BookOrbit book can be an ebook and an audiobook under one id.

The key is checked at entry (auth/me), kept with the other secrets, never
shown back or logged. The probe now also checks whether the e-reader sign-in
alone can download audio.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
Reading time: the page rows of KOReader's statistics database since the last
upload, per BookOrbit book (by fingerprint), to /koreader/plugin/page-stats,
read and sent in a background process a moment after a book closes
(gzreader_bo_stats.lua). Ratings: the client's putRating and the record's
rating, through the existing rating sync.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
A book's menu can change your BookOrbit collections through the main API
(GET collections, POST/DELETE collections/:id/books) when the API key is
saved. Only collections that are yours are offered. Without the key the
menu says where to enter it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
The Catalog's BookOrbit card gets Request a book (title, author, book or
audiobook) and My book requests (state, the decision's note, cancel),
through BookOrbit's book-requests routes with the API key. The key's
setting is now "BookOrbit API key", since collections and requests use
it as well as audiobooks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
The setup page can sign in to BookOrbit with its address and an API key.
The key (with the KOReader sync permission) reads the account's sync user
name and, from the server's preconfigured-plugin zip, its sync key; the
Kindle then signs in as usual. With no sync sign-in on the account, one
is made under the account's name with a random password. Nothing in the
zip is kept or run, and neither key is logged or shown back.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
… may do

Step 8 groundwork. The probe now sends the browser's preflight and a
signed-in request as the sync page's origin and says whether the server
(its reverse proxy) answers it, and reports what the API key is allowed
to do: the KOReader sync sign-in, collections, book requests. The mock
can stand behind a proxy that lets one origin in.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
Home's reading stats widget takes its numbers from the server signed in
to: Grimmory's user stats as before, or BookOrbit's catalog dashboard
(streak, goal, minutes per day for a year, badges). A tap opens a page
with charts drawn from those numbers. The mock gets the dashboard route,
and one comment line in its stand-in zip that matched BookOrbit's source
is reworded.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
Async.ensureToken forked a do-nothing "refresh login" process for every
download and index run with BookOrbit (it has no access token to check).
It now answers at once. Grimmory's bookmarks module is required only when
Grimmory is the server. The stats job is tagged "reading stats". A new
emulator tour compares a book session signed in to nothing and to
BookOrbit and lists the requests made.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
Caddy and nginx (and Nginx Proxy Manager) rules for the sync page's
origin, what they do and don't allow, and how to check with the probe.
The page itself doesn't speak BookOrbit yet; the wiki says so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
…etting

The key's needed access and permissions are named as BookOrbit's Create
API key page names them, in the setup page, the Kindle's help and the
wiki (with a table per feature). Messages use BookOrbit's real settings
paths. With a key that can see the sync sign-in, GZreader reads how
read-aloud EPUBs are delivered and says so when it's the original with
narration. A sign-in GZreader makes keeps BookOrbit's defaults.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
The tab is Books and the heading names the server, following the Book
server choice. BookOrbit gets its own form (API key first, sync name and
password as the other way, no single sign-on); the other server's fields
are hidden and disabled. Connecting, disconnecting and the Kindle's
summary name the right server. Saving or removing the BookOrbit API key
is confirmed on the page with what the key can do.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
matchLibraryFiles only ran from libraryUpkeep (when the library index
was built), so after switching servers the books already downloaded
still said Download. It now runs 2 s after a BookOrbit sign-in and when
Wi-Fi connects (it does nothing when no file is new or changed).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
gzreader_servername.lua gives the server's own words; the Catalog's
Shelves card, lists and the texts that named Grimmory pass through it.
Grimmory reads as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
#338 gives Gzip.inflate a second argument of its own (a size limit), so
changing its signature here kept this PR and everything built on it out
of the test build.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HqNYrwobY8un97LQ2jriQC
@9retirement6irk 9retirement6irk added the beta Include in the beta branch (test builds over Wi-Fi) label Nov 23, 2026
github-actions Bot added a commit that referenced this pull request Nov 23, 2026
# Conflicts:
#	plugins/gzreader.koplugin/gzreader_changelog.lua
github-actions Bot added a commit that referenced this pull request Nov 23, 2026
# Conflicts:
#	plugins/gzreader.koplugin/gzreader_changelog.lua
@9retirement6irk
9retirement6irk merged commit b9ae741 into main Nov 23, 2026
3 checks passed
@9retirement6irk
9retirement6irk deleted the fix/bookorbit-catalog-names branch November 23, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta Include in the beta branch (test builds over Wi-Fi)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants