-
-
Notifications
You must be signed in to change notification settings - Fork 450
KOBO_ANNOTATION_SYNC
This feature automatically syncs annotations (highlights and notes) from your Kobo e-reader to your Hardcover.app reading journal. Whenever you highlight text or add notes on your Kobo device, they will be automatically uploaded to Hardcover when you sync your device.
- Automatic sync: Annotations sync automatically when your Kobo device connects
- Bidirectional updates: Edited annotations on Kobo update on Hardcover
- Deletion support: Deleting annotations on Kobo removes them from Hardcover
- Progress tracking: Includes reading progress with each annotation
- Markdown protection: Annotations are safely escaped to prevent formatting issues
- Kobo Sync Enabled: Your CWA instance must have Kobo sync configured
- Hardcover Account: You need a Hardcover.app account with API token
- Book Identifiers: Books must have Hardcover identifiers (hardcover-id, hardcover-edition, or hardcover-slug)
- Log in to CWA as an admin
- Navigate to Admin → Basic Configuration
- Find the Kobo section
- Enable Kobo Annotation Sync to Hardcover
- Click Save
- Visit Hardcover.app
- Log in to your account
- Go to Settings → Developer API
- Copy your API token
- Navigate to Your Profile → Edit Profile
- Find the Hardcover Integration section
- Paste your API token
- Click Save
For each book you want to sync annotations for:
- Edit the book metadata in CWA
- Add one of these identifiers:
-
hardcover-id: The Hardcover book ID (e.g.,12345) -
hardcover-edition: The Hardcover edition ID -
hardcover-slug: The book's URL slug (e.g.,the-lord-of-the-rings)
-
Tip: You can find these in the Hardcover book URL:
- URL:
https://hardcover.app/books/the-lord-of-the-rings - Slug:
the-lord-of-the-rings
- Highlight text or add a note on your Kobo device
- Sync your Kobo with CWA
- CWA detects the new annotation
- The annotation is formatted and sent to Hardcover:
- Highlights appear as blockquotes
- Notes appear as regular text
- Reading progress is calculated and included
- The annotation appears in your Hardcover reading journal
- Edit an annotation on your Kobo device
- Sync your Kobo with CWA
- CWA detects the change
- The existing Hardcover journal entry is updated
- Delete an annotation on your Kobo device
- Sync your Kobo with CWA
- CWA detects the deletion
- The corresponding Hardcover journal entry is removed
If you don't want annotations from a specific book to sync to Hardcover:
- Edit the book in CWA
- Find the Hardcover Settings section
- Enable Blacklist Annotations
- Click Save
Note: This prevents new annotations from syncing. Existing annotations remain on Hardcover.
CWA calculates your exact reading progress by:
- Parsing the EPUB/KEPUB file structure
- Analyzing the spine (reading order)
- Counting characters in each chapter
- Determining your position in the book
- Converting to a percentage
This provides more accurate progress tracking than simple page numbers.
Check these items:
- ✅ Kobo Sync is enabled (Admin → Basic Configuration)
- ✅ Annotation Sync is enabled (Admin → Basic Configuration)
- ✅ You have a valid Hardcover API token (Profile → Edit)
- ✅ The book has Hardcover identifiers (Edit Book → Identifiers)
- ✅ The book is not blacklisted (Edit Book → Hardcover Settings)
Progress calculation requires:
- The book must be in EPUB or KEPUB format
- The file must be accessible by CWA
- The EPUB structure must be valid
If progress calculation fails, annotations still sync but without progress data.
This can happen if:
- The sync was interrupted and retried
- The book identifiers changed
- Manual entries were created on Hardcover
Solution: Delete duplicates manually on Hardcover.app
If a book doesn't have Hardcover identifiers:
- Search for the book on Hardcover.app
- Copy the book slug from the URL
- Add it as
hardcover-slugidentifier in CWA - Annotations will start syncing on next sync
Annotations inherit your Hardcover account privacy settings. To change:
- Go to Hardcover.app → Settings → Privacy
- Adjust your default privacy level
- New annotations will use the new setting
Note: CWA uses your account's default privacy level for all synced annotations.
Annotations are formatted as:
Highlight only:
> This is the highlighted text
Highlight with note:
> This is the highlighted text
-- This is my note about the highlight
Note only:
This is my standalone note
Each annotation includes:
- Tags: Automatically tagged with "CWA" and "Kobo"
- Progress: Reading progress as page number and percentage
- Timestamp: When the annotation was created on Kobo
- Event type: Either "quote" (highlight) or "note"
CWA tracks synced annotations in the kobo_annotation_sync table to:
- Prevent duplicate syncs
- Enable updates and deletions
- Link Kobo annotations to Hardcover journal entries
Hardcover.app has API rate limits. If you sync many annotations at once:
- Syncing happens sequentially (one at a time)
- Large batches may take several minutes
- Failed syncs are logged but don't block others
- API tokens are stored encrypted in the database
- Annotations are sanitized to prevent markdown injection
- Only authenticated users can sync annotations
- HTTPS is used for all API communication
For issues or questions:
- Check the CWA logs: Admin → Logs → CWA Logs
- Search for "annotation" or "hardcover" in the logs
- Report issues on GitHub with relevant log excerpts
Current limitations:
- ❌ Cannot sync annotations created before enabling the feature
- ❌ Cannot sync annotations from other e-reader apps
- ❌ Progress calculation only works for EPUB/KEPUB formats
- ❌ No bulk import of historical annotations
- ✅ Real-time sync on every Kobo connection
- ✅ Supports all Kobo annotation types
- ✅ Preserves annotation formatting
This feature was contributed by @wolffshots in PR #731.