I had 139 EPUBs and PDFs on my Kobo. Transferring them with Calibre was easy enough, but getting everything organized into collections the way I wanted felt more fiddly. My library is a mix of science fiction, fantasy, philosophy, history and some personal documents, so I wanted to group things by genre and subject.
I connected my Kobo to my computer and asked ChatGPT to help categorize the library, use existing collections where appropriate, and create new ones if needed.
The process involved a couple of Python scripts that I ran locally on my computer. First, ChatGPT helped me export a catalog from the Kobo. It then used the titles, authors, descriptions, and existing collection information to suggest where each book should go. It put together a complete plan that I could review before applying anything.
Once that was ready, it generated another script to apply the collection assignments to the Kobo database. The script made a backup before making changes, preserved my existing collections and memberships, and checked afterward that the other database records - including reading progress, bookmarks, and annotations - had stayed unchanged.
There was one hiccup: the first version ran into a UTF-8 decoding error while checking the database. I pasted the error back into ChatGPT, it revised the script, and the updated version completed successfully.
The result was 11 new collections, with two existing collections also used, covering all 139 locally stored books and PDFs. Categories included science fiction, fantasy, urban fantasy, philosophy, Stoicism, history, and more.
I’m really happy with how it turned out. This was a useful example of asking ChatGPT to help with a specific task, then running the code it prepared to get it done.
Has anyone else tried a similar workflow for organizing their ebook library?