Skip to content

Feature: keep c-w shelves in sync with calibre collections#3353

Open
xdgc wants to merge 4 commits intojaneczku:masterfrom
xdgc:sync-collections
Open

Feature: keep c-w shelves in sync with calibre collections#3353
xdgc wants to merge 4 commits intojaneczku:masterfrom
xdgc:sync-collections

Conversation

@xdgc
Copy link
Copy Markdown
Contributor

@xdgc xdgc commented Apr 3, 2025

This adds a new feature to sync Calibre-Web shelves to Calibre Collections. This can run ad hoc from a user's personal settings page OR as a scheduled daily task. Each user who has this feature enabled will be synced — users who do not individually enable it will not see changes.

When sync runs by either method, C-W detects which custom column from Calibre is configured as "collections" and then gathers all books that have collections set. For each named collection, if that collection does not exist as a shelf on the user's account, the shelf is created. Shelves are never removed. Then the set of bookids in the Calibre collection is diffed against the set of bookids in the C-W shelf. Missing books are added, and surplus books are removed. To maintain a shelf in C-W separately from Calibre, just name it something that doesn't exist in Calibre.

xdgc added 4 commits April 2, 2025 22:31
The file with all the feature code is a new file, so I forgot
to add it.
In some recent evolution (I think?) it became necessary for a task to
supply its own app context. That wasn't needed when I wrote the patch
initially but is needed now.
@xdgc
Copy link
Copy Markdown
Contributor Author

xdgc commented Jul 5, 2025

@OzzieIsaacs bump, please consider this compatibility feature

@webysther
Copy link
Copy Markdown
Contributor

Calibre collections are series in cw, how this will not cause a loop? If you sync cw shelf in calibre they will appear inside c-w as series, no?

@xdgc
Copy link
Copy Markdown
Contributor Author

xdgc commented Feb 25, 2026

Calibre collections are series in cw, how this will not cause a loop? If you sync cw shelf in calibre they will appear inside c-w as series, no?

I'm afraid I don't follow. In Calibre, series and collections are different things. Calibre doesn't have native collections, but the Kobo Utilities and Kindle Collections plugins add it as a custom field (#collections). You can use this field to sync shelves on the Kobo, if you sync your Kobo with Calibre.

If you switch to using CW for Kobo sync, you lose that.

This feature update allows you to sync #collections from Calibre to CW shelves, so that CW can sync shelves to Kobo.

@webysther
Copy link
Copy Markdown
Contributor

Calibre collections are series in cw, how this will not cause a loop? If you sync cw shelf in calibre they will appear inside c-w as series, no?

I'm afraid I don't follow. In Calibre, series and collections are different things. Calibre doesn't have native collections, but the Kobo Utilities and Kindle Collections plugins add it as a custom field (#collections). You can use this field to sync shelves on the Kobo, if you sync your Kobo with Calibre.

If you switch to using CW for Kobo sync, you lose that.

This feature update allows you to sync #collections from Calibre to CW shelves, so that CW can sync shelves to Kobo.

Oh, now I get it, my bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants