feat: persistent SQLite storage for bookmarks + positions keyed by content_hash
- new bookish/services/database.py: SQLite with WAL mode, tables for bookmarks and reading_positions, keyed by content_hash (SHA256) - new bookish/routes/api.py: REST endpoints for CRUD bookmarks and save/load reading position - upload endpoint returns content_hash (SHA256 of file) - reader route computes SHA256 and passes BOOKISH_HASH to template - reader.js: bookmarks + positions use API server as primary storage with localStorage fallback for offline/resilience - position saves debounced (1.5s) to avoid hammering server - .gitignore: added bookish.db
This commit is contained in:
1 parent
13e02faa8b
commit
c1421665c0
8 files changed
+319
-25
No files matched your search
@@ -5,3 +5,4 @@ uploads/
|
||||
converted/
|
||||
.venv.bak/
|
||||
.sisyphus/
|
||||
bookish.db
|
||||
Reference in new issue
Block a user