10-02-2012, 03:44 AM | #1 |
Enthusiast
Posts: 36
Karma: 24
Join Date: Jul 2008
Device: Kobo Aura HD
|
Script: Creating and populating shelves based on calibre tags
Here's my version of a script to create and populate Kobo Shelves (kobo touch firmware v. 2.1.1) based on my calibre tags. Feel free to tweak away to make it useful for you. Should be pretty self-explanatory.
Notes:
tagger.py Last edited by Krytes; 10-02-2012 at 03:48 AM. |
10-02-2012, 09:25 AM | #2 |
Evangelist
Posts: 444
Karma: 2269648
Join Date: Jun 2010
Location: Toronto
Device: Kobo: Original, WiFi, Touch, Aura, Aura H20, MiniGloHD ;) iOS app
|
Does that set the "Name" and "InternalName" fields in the DB to the same value? My skills with python aren't that great so I'm unsure. If it does do this, great, if not, I'd suggest changing it so Name and InternalName are being set to the same value.
When testing the shelf sync on iOS we found if Name was set and InternalName was left blank, then the Touch would pick up the shelf, but on the next sync it seemed to create another shelf of the same name. We tracked it down to us not setting the InternalName as well as the Name. We looked at what Touch did and saw it set both, and once we did the same, everything worked as it should. One other thing to note is that iOS now supports shelf sync, previously it was Touch only, and thus if you were to create shelves, manually, or via this script, then if you sync your Touch, the shelves will sync, and if you happen to have the iOS app, and it syncs then it will pull down these shelves. If the books are in your Kobo Library, ie; not side-loaded, you will see them populate in the shelves. If they are side-loaded, well, you may end up with an empty shelf. If you delete that shelf on iOS then when you next sync the Touch the shelf will be removed as it's removed from the server. |
Advert | |
|
10-02-2012, 10:18 AM | #3 |
Trying for calm & polite
Posts: 4,012
Karma: 9455193
Join Date: May 2010
Location: Mostly in Canada
Device: kobo original, WiFI, Touch, Glo, and Aura
|
Watch for a Kobo driver that handles shelves in a very kewl way. It's very, very nice.
|
10-02-2012, 10:25 AM | #4 | |||
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I'm not the author of the script, but I know something about this.
Quote:
As a curiosity, are shelf names in the iOS app case sensitive? And does it allow leading or trailing blanks? On the Touch you can create "aaa", " aaa", "aaa " and "AAA". In the list you can't see the difference between the first three. And personally, I would prefer them not to be case sensitive. Quote:
Quote:
For anyone who does use this script, or otherwise creates a lot of shelves, there is a performance issue. The performance of shelf related actions is dependent on the number of shelves and the number of books on the shelves. By this I mean that 10 shelves with 100 books on each is as bad as 100 shelves with 10 books on them. Kobo is improving this, but I find that a WiFi sync doesn't work with a lot of books on shelves. As taming said, there will be a new driver in calibre soon. It should be in one of the next two builds. It will support shelves in a similar fashion to this script, but you can specify one or more columns to use for the shelves. So, you could specify the tags column and the series column. And it will support the Glo and Mini. Last edited by davidfor; 10-02-2012 at 10:28 AM. Reason: slight edit because taming beat me. |
|||
10-02-2012, 12:15 PM | #5 | |
Enthusiast
Posts: 36
Karma: 24
Join Date: Jul 2008
Device: Kobo Aura HD
|
Quote:
Yes, Name and InternalName are set to the same thing. I don't have any iOS devices or the Kobo app and have never synced my touch- all of my books are side-loaded via Calibre- so I haven't run into any problems. Are you saying that iOS now supports shelves so that manually created shelves behave properly with side-loaded books? |
|
Advert | |
|
10-02-2012, 12:19 PM | #6 | |
Enthusiast
Posts: 36
Karma: 24
Join Date: Jul 2008
Device: Kobo Aura HD
|
Quote:
|
|
10-02-2012, 01:02 PM | #7 |
Grand Sorcerer
Posts: 12,466
Karma: 74317826
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Well... since there is a calibre release every week... either this Friday or next Friday!
|
10-02-2012, 01:57 PM | #8 | ||
Evangelist
Posts: 444
Karma: 2269648
Join Date: Jun 2010
Location: Toronto
Device: Kobo: Original, WiFi, Touch, Aura, Aura H20, MiniGloHD ;) iOS app
|
Quote:
Quote:
Shelf names on iOS are not case sensitive, e.g.; "AAA" and "aaa" are seen as the same thing. Leading and trailing blanks are seemingly supported as well, |
||
Tags |
calibre, shelves, tags |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Populating Calibre with books already on my Kobo | peterbyron | Kobo Reader | 12 | 07-25-2012 03:44 AM |
Exporting based on individual tags | BookJunkieLI | Library Management | 7 | 02-22-2012 04:18 PM |
Cleaning up tags based on content | Olger | Recipes | 2 | 12-14-2011 10:56 PM |
Creating TOC for books based on Text Files | crich70 | Kindle Formats | 4 | 09-13-2010 12:47 AM |
Software for creating image-based PDFs | 301verbs | Workshop | 2 | 06-13-2009 12:51 PM |