How to manage Kobo collections from a Mac
On a Mac, you manage Kobo collections as shelves. Readwyn, an ebook library app for Mac and Linux, treats each shelf in your library as a Kobo collection of the same name. Put books on a shelf called “Holiday”, connect the Kobo, run a Readwyn → Device sync, and a collection called “Holiday” holds those books on the Kobo. The other direction works too: a collection you made on the Kobo comes into the library as a shelf when you sync Device → Readwyn.
Putting books on a shelf
For one book, open it and look at the Overview tab, which lists its shelves with “Add to shelf”. For a batch, select the books in the grid or the list (Cmd+click adds one, Shift+click takes a run) and click “Add to shelf” in the selection bar. That opens a sheet with the number of books in its title (“Add 3 books to a shelf” for three) and a checkbox for each shelf. A shelf that holds only some of the selected books shows a bar and a count such as “1 of the 3 books”. Clicking a shelf that holds them all takes them off it, and “New shelf” with “Add” starts a new one.
The Filter menu counts the books of each shelf. The collection on the Kobo gets only those of them that are already on the Kobo.
Sending the shelves to the Kobo
Connect the Kobo with a USB cable and tap Connect on its screen. On the Sync screen, the Readwyn → Device card says what it carries: “Send progress, highlights, notes, shelves and My Words from the library to the Kobo.”
Its button opens the review. Each new membership is its own row, “Add · Shelf”, with the shelf's name and “a collection on the Kobo”. Nothing is written until you apply the rows you've ticked, and the message afterwards confirms that the device database was backed up first. The write goes into the Shelf and ShelfContent tables of .kobo/KoboReader.sqlite, in the same guarded transaction as everything else the sync changes (how those writes are kept safe). A new collection gets the type UserTag.
Eject the Kobo, and look under My Books, Collections. One caveat from Readwyn's own design notes: the table layout comes from the database of a Kobo Libra Colour that had no collections, so the rows Readwyn writes haven't yet been compared with rows a Kobo made itself.
Taking a book out of a collection
Take a book off a shelf in Readwyn and the next Readwyn → Device review shows the collection it's still in on the Kobo. What happens to it depends on the merge option, “Merge highlights, notes and words”, which each device has and each review can change.
With merging on, nothing is removed. The row reads “The book stays in “Holiday” on the Kobo; merging deletes nothing.” With merging off, the row says the book leaves this collection on the Kobo, and applying it takes the book out. Readwyn marks the old row as deleted rather than erasing it, which is how the Kobo records its own removals.
A collection that loses its last book stays on the Kobo, empty. Remove it on the device: Kobo's help page has you open My Books, tap Collections, tap and hold the collection's name, and tap Delete twice.
Collections you made on the Kobo
The same help page gives the steps on the device: My Books, Collections, the Menu icon, then New collection. Kobo also says a collection appears in the Kobo Books app, possibly after a delay.
To bring those collections into the library, run Device → Readwyn. Its card doesn't name shelves, but its review has a row for each collection a book is in that the library doesn't have. Each one becomes a shelf of the same name for the books that are in both places.
The merge option counts here too. With it off, a shelf that a book has in the library but not on the Kobo shows as a row in which the book leaves that shelf in Readwyn; untick it, or turn merging on for that review, to keep the shelf.
The sync takes only collections of the type UserTag, or with no type at all; a collection of any other type isn't one the user made and stays out.
Names are what link a shelf to a collection: a shelf and a collection with different names are two things to the sync.
What a sync leaves alone
- Books that aren't on the Kobo yet. A sync covers books that are in the library, on the device, and in the Kobo's own database. It never adds or deletes a book. Send one with “Send to device” on its book page, then eject and unplug the Kobo so that it imports the new book. Connect it again and sync its shelves.
- Smart shelves. A shelf that fills itself from rules stays in the library. No Kobo, Kindle or reading service gets it.
- Books only on the Kobo. The Sync screen counts them in one line, such as “3 books on Kobo Clara 2E are not in this library”, and the sync skips them, so their collections stay as they are.
- A Kobo without collection tables. If its database has no
ShelfandShelfContenttables, it has no collections, and the sync carries no shelves to it.
If calibre built your collections
calibre's KoboTouch driver makes collections from the library columns you pick in its settings, according to the MobileRead wiki's page on Kobo shelves and collections, for example a custom column of shelf names or the series column. Those collections are already on the Kobo. Import your calibre library into Readwyn, then run Device → Readwyn: each of those collections that has the type UserTag or no type arrives as a shelf for the books you imported (leaving calibre without losing your Kobo history covers the whole move). The review lists every change before anything is applied, so you can see which shelves came across. From then on, you change the shelves in Readwyn and send them back.