Update documentation and API tests: Bookmann → Bookhoard

Documentation updates:
- All docs/ files: Update project references
- Bruno API collection: Update collection name and tests
- Device setup guides: Update all examples
- Implementation plan: Update database schema examples
- README files: Update project references

Part of project rename to Bookhoard.
This commit is contained in:
2026-02-01 16:20:56 -05:00
parent 547bc6f8f8
commit ff96ffa92d
19 changed files with 103 additions and 103 deletions
+36 -36
View File
@@ -238,16 +238,16 @@ CREATE TABLE device_catalogs (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
device_id UUID REFERENCES devices(id) ON DELETE CASCADE,
media_item_id UUID REFERENCES media_items(id) ON DELETE CASCADE,
bookmann_uuid UUID NOT NULL,
bookhoard_uuid UUID NOT NULL,
kobo_content_id VARCHAR(255) NOT NULL,
content_id_type VARCHAR(20), -- 'bookmann_uuid', 'kobo_generated', 'isbn_based'
content_id_type VARCHAR(20), -- 'bookhoard_uuid', 'kobo_generated', 'isbn_based'
available BOOLEAN DEFAULT TRUE,
delivery_date TIMESTAMP WITH TIME ZONE,
delivery_method VARCHAR(20), -- 'wireless', 'usb', 'manual'
UNIQUE(device_id, kobo_content_id)
);
CREATE INDEX idx_device_catalogs_bookmann ON device_catalogs(bookmann_uuid);
CREATE INDEX idx_device_catalogs_bookhoard ON device_catalogs(bookhoard_uuid);
CREATE INDEX idx_device_catalogs_kobo ON device_catalogs(kobo_content_id);
```
@@ -266,9 +266,9 @@ CREATE TABLE system_config (
-- Pre-seeded values
INSERT INTO system_config (key, value) VALUES
('base_url', 'https://bookmann.example.com'),
('opds_base_url', 'https://bookmann.example.com/opds'),
('api_base_url', 'https://bookmann.example.com/api');
('base_url', 'https://bookhoard.example.com'),
('opds_base_url', 'https://bookhoard.example.com/opds'),
('api_base_url', 'https://bookhoard.example.com/api');
```
### Table: opds_tokens (NEW)
@@ -345,7 +345,7 @@ Query Bookhoard for a book by multiple identifier types with confidence scoring.
"matches": [
{
"media_item_id": "uuid-123",
"bookmann_uuid": "uuid-123",
"bookhoard_uuid": "uuid-123",
"confidence": 1.0,
"match_method": "uuid_match"
}
@@ -663,7 +663,7 @@ Main OPDS 1.2 catalog feed.
<link rel="start" href="http://192.168.1.100:8765/opds/devices/kobo-id/nav"/>
<entry>
<id>urn:uuid:bookmann-uuid-123</id>
<id>urn:uuid:bookhoard-uuid-123</id>
<dc:title>The Hobbit</dc:title>
<dc:creator>J.R.R. Tolkien</dc:creator>
<updated>2026-01-31T10:00:00Z</updated>
@@ -683,14 +683,14 @@ Main OPDS 1.2 catalog feed.
rel="alternate"/>
<!-- Canonical ID for progress matching -->
<dc:identifier id="bookmann">uuid-123</dc:identifier>
<dc:identifier id="bookhoard">uuid-123</dc:identifier>
<!-- Hash for sidecar matching -->
<meta property="bookmann:sha256">abc123...</meta>
<meta property="bookhoard:sha256">abc123...</meta>
<!-- Collections as categories -->
<category scheme="http://bookmann.example.com/collections">Science Fiction</category>
<category scheme="http://bookmann.example.com/collections">Reading</category>
<category scheme="http://bookhoard.example.com/collections">Science Fiction</category>
<category scheme="http://bookhoard.example.com/collections">Reading</category>
</entry>
<!-- More entries... -->
@@ -709,7 +709,7 @@ OPDS acquisition search endpoint.
<id>urn:uuid:device-id</id>
<entry>
<id>urn:uuid:bookmann-uuid-123</id>
<id>urn:uuid:bookhoard-uuid-123</id>
<dc:title>The Hobbit</dc:title>
<dc:creator>J.R.R. Tolkien</dc:creator>
<updated>2026-01-31T10:00:00Z</updated>
@@ -854,8 +854,8 @@ Kobo progress sync with ContentId mapping (enhanced).
catalog, err := db.GetDeviceCatalogByKoboContentId(ctx, contentId)
if err == nil && catalog.Valid {
// Found! Use canonical Bookhoard UUID
bookmannUUID = catalog.BookhoardUUID
return bookmannUUID, nil
bookhoardUUID = catalog.BookhoardUUID
return bookhoardUUID, nil
}
// Step 2: ContentId not found - try SHA-256 (if looks like hash)
@@ -988,13 +988,13 @@ KOReader annotations sync with SHA-256 support.
#### GET `/api/sync/sidecar/:deviceId`
Download unified `.bookmann.json` configuration file.
Download unified `.bookhoard.json` configuration file.
**Response**:
```json
{
"version": "1.0",
"bookmann": {
"bookhoard": {
"opds_catalog": "http://192.168.1.100:8765/opds/devices/kobo-id/catalog",
"sync_api": "http://192.168.1.100:8765/api/sync/kobo",
"opds_base_url": "http://192.168.1.100:8765/opds",
@@ -1003,7 +1003,7 @@ Download unified `.bookmann.json` configuration file.
},
"books": {
"sha256:abc123...": {
"bookmann_uuid": "uuid-123",
"bookhoard_uuid": "uuid-123",
"title": "The Hobbit",
"author": "J.R.R. Tolkien",
"available_formats": ["epub", "kepub"]
@@ -1034,9 +1034,9 @@ Get system-wide configuration.
```json
{
"config": {
"base_url": "https://bookmann.example.com",
"opds_base_url": "https://bookmann.example.com/opds",
"api_base_url": "https://bookmann.example.com/api",
"base_url": "https://bookhoard.example.com",
"opds_base_url": "https://bookhoard.example.com/opds",
"api_base_url": "https://bookhoard.example.com/api",
"auto_convert_kepub": true,
"default_opds_refresh_interval": 3600
}
@@ -1219,7 +1219,7 @@ func EvaluateRules(mediaItem MediaItem, rules []Rule) []RuleEvaluation {
**OPDS Response Structure (OPDS 1.2)**:
```xml
<entry>
<id>urn:uuid:bookmann-uuid-123</id>
<id>urn:uuid:bookhoard-uuid-123</id>
<dc:title>The Hobbit</dc:title>
<dc:creator>J.R.R. Tolkien</dc:creator>
<updated>2026-01-31T10:00:00Z</updated>
@@ -1238,15 +1238,15 @@ func EvaluateRules(mediaItem MediaItem, rules []Rule) []RuleEvaluation {
rel="alternate"/>
<!-- Canonical ID for progress matching -->
<dc:identifier id="bookmann">uuid-123</dc:identifier>
<dc:identifier id="bookhoard">uuid-123</dc:identifier>
<!-- Hash for sidecar matching (format-specific if available) -->
<meta property="bookmann:sha256">abc123...</meta>
<meta property="bookmann:kepub_sha256">xyz789...</meta>
<meta property="bookhoard:sha256">abc123...</meta>
<meta property="bookhoard:kepub_sha256">xyz789...</meta>
<!-- Collections as categories -->
<category scheme="http://bookmann.example.com/collections">Science Fiction</category>
<category scheme="http://bookmann.example.com/collections">Reading</category>
<category scheme="http://bookhoard.example.com/collections">Science Fiction</category>
<category scheme="http://bookhoard.example.com/collections">Reading</category>
</entry>
```
@@ -1367,7 +1367,7 @@ if book.FilePath != "" {
```json
{
"version": "1.0",
"bookmann": {
"bookhoard": {
"opds_catalog": "http://192.168.1.100:8765/opds/devices/kobo-id/catalog",
"sync_api": "http://192.168.1.100:8765/api/sync/kobo",
"opds_base_url": "http://192.168.1.100:8765/opds",
@@ -1376,7 +1376,7 @@ if book.FilePath != "" {
},
"books": {
"sha256:abc123...": {
"bookmann_uuid": "uuid-123",
"bookhoard_uuid": "uuid-123",
"title": "The Hobbit",
"author": "J.R.R. Tolkien",
"available_formats": ["epub", "kepub"]
@@ -1443,14 +1443,14 @@ if book.FilePath != "" {
1. Log into Bookhoard web UI
2. Go to Device Management → Your Kobo device
3. Click "Download Configuration" button
4. File downloads as `.bookmann.json`
4. File downloads as `.bookhoard.json`
```
**Step 2: Configure Kobo for OPDS**
```
1. On Kobo, go to Settings → Sync & Backup
2. Tap "Add Content Server" or "Add OPDS Feed"
3. Enter URL from `.bookmann.json`:
3. Enter URL from `.bookhoard.json`:
http://192.168.1.100:8765/opds/devices/YOUR_DEVICE_ID/catalog
4. Kobo will automatically:
- Connect to Bookhoard
@@ -1487,7 +1487,7 @@ Same as Kobo setup above
```
1. Open KOReader settings
2. Enable "OPDS catalog" in network/synchronization section
3. Enter OPDS URL from `.bookmann.json`:
3. Enter OPDS URL from `.bookhoard.json`:
http://192.168.1.100:8765/opds/devices/YOUR_DEVICE_ID/catalog
4. KOReader will automatically:
- Connect to Bookhoard catalog
@@ -1521,7 +1521,7 @@ Place in KOReader's config directory
**Step 3: Use Sidecar for Progress Sync**
```
KOReader plugin reads .bookmann.json
KOReader plugin reads .bookhoard.json
→ Matches local files to Bookhoard UUIDs via SHA-256
→ Syncs progress using canonical UUIDs
→ Works offline
@@ -1622,7 +1622,7 @@ Can be: Public (no authentication required)
### Manual Testing Checklist
**Kobo Workflow**:
- [ ] Download `.bookmann.json` from web UI
- [ ] Download `.bookhoard.json` from web UI
- [ ] Transfer to Kobo via USB
- [ ] Configure OPDS URL on Kobo
- [ ] Browse catalog wirelessly
@@ -1631,7 +1631,7 @@ Can be: Public (no authentication required)
- [ ] Verify progress syncs to Bookhoard
**KOReader Workflow**:
- [ ] Download `.bookmann.json` from web UI
- [ ] Download `.bookhoard.json` from web UI
- [ ] Configure OPDS URL in KOReader
- [ ] Browse catalog wirelessly
- [ ] Download book
@@ -1669,7 +1669,7 @@ Can be: Public (no authentication required)
- **Media Item Formats**: Tracks all format versions with their hashes. Pre-convert EPUB to KEPUB during scan for optimal performance.
- **System Config**: Key-value store for system-wide settings (base_url, opds_base_url, api_base_url). Enables flexible deployment.
- **OPDS Tokens**: Per-device access tokens for OPDS catalog browsing. Optional - can also support user-scoped and admin tokens.
- **Sidecar File**: `.bookmann.json` - Unified configuration file for devices. Contains OPDS URLs, sync API endpoints, book mappings, collection mappings.
- **Sidecar File**: `.bookhoard.json` - Unified configuration file for devices. Contains OPDS URLs, sync API endpoints, book mappings, collection mappings.
- **Auto-Assign Rules**: Configurable criteria for automatically adding books to collections. Fields: genre, series, author, language, publisher, copyright_year, tags. Operators: equals, contains, starts_with, ends_with, greater_than, less_than.
- **Sync Direction**: For device shelf mappings. 'bidirectional' (sync both ways), 'book_to_hoard' (send to device), 'device_to_hoard' (read from device), 'none' (no sync).
- **View Settings**: Per-device preferences for how collections are displayed (grid vs list, which collections are visible).