docs/library.md: Eingang (Cloud-Quelle bringt neue Bücher von selbst)
Some checks failed
Build and push Docker image / build (push) Successful in 15s
Test / test (push) Successful in 10m43s
Test / e2e (push) Failing after 1m27s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mrwnslz 2026-10-24 18:13:04 +02:00
parent cec07dd208
commit a73ade5422

View file

@ -112,6 +112,29 @@ sakral (Religion & Mythologie), spiel (Kinder & Jugend), code (Informatik),
typo, wellen, botanik, berge, zellen — and bauhaus when nothing matches. A hash
of title and author picks palette, layout and every detail.
### Eingang: books from a cloud folder by themselves (since 2026-10-24)
A cloud source (Einstellungen → Cloud-Verbindungen, WebDAV: `accounts.WebDAVSource`,
`accounts/webdav.py`) can be marked **Eingang**: its new books come into the library without
anyone importing them. The server can't do it alone — the books are encrypted with the key
on the devices — so a device does:
1. `static/js/app/57-cloud-inbox.js`: after the book list has loaded (at most every 5
minutes; only with the real key in `localStorage`, never on diora Reader) it asks
`GET /books/cloud/inbox/` → `{files: [{source, label, path, name, size, modified}], errors}`:
the `.epub`/`.pdf` files of the Eingang sources (three folders deep) no device has taken.
The server claims them for this device for ten minutes (another device asking meanwhile
doesn't get them).
2. Each file: fetched through the server (`/books/cloud/<id>/fetch/`), imported like any file
(`_importEbookBuffer`, `skipKnown`: same title and author → left out), then
`POST /books/cloud/<id>/done/ {path, result}` with `imported`, `known`, `too_big` (not
offered again) or `failed` (again once the claim ran out).
3. The server keeps them in `accounts.WebDAVSeen` (source, path, size, modified): a file whose
size changed counts as new. The folder itself is never changed.
The first such source: Shelfmark's e-book downloads on the Hetzner server, served read-only by
dufs (set up by the "Media" session; its notes: `C:\Users\m\homelab-handoff\04-hoerbuecher.md`).
## Zeitschriften: das Heft und seine Artikel
An issue is a unit (the editors' selection and order, its date, its theme) and