Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 05-26-2013, 03:13 PM   #181
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,540
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
All I can think of right now is using a single custom column as the source for the shelves, and that this custom column would itself contain logic to select the value of myshelves if not blank, else Series if defined, else the value Uncategorized.
PeterT is offline  
Old 05-26-2013, 03:30 PM   #182
Toris
Junior Member
Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.
 
Posts: 8
Karma: 7938
Join Date: May 2012
Device: kobo and bebook
Quote:
Originally Posted by PeterT View Post
All I can think of right now is using a single custom column as the source for the shelves, and that this custom column would itself contain logic to select the value of myshelves if not blank, else Series if defined, else the value Uncategorized.
Thank you for your reply

But, I am sorry I do not understand.

How do I do this?
Toris is offline  
Advert
Old 05-26-2013, 04:11 PM   #183
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,540
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
This is probably not the cleanest way of doing it, but it seems to work.

Add a new custom column with Lookup Name shelftopic and Column Heading Shelf Topic of type Column built from other columns
Set it's template to
Code:
{#myshelves:'ifempty($, field('Series'))'}
Add another custom column with Lookup Name shelfname and Column Heading Shelf Name of type Column built from other columns
Set it's template to
Code:
{#shelftopic:'ifempty($,'Uncategorized')'}
Restart Calibre

Change the shelf options in the Kobo Driver to simply #shelfname and all should be done.

The first column shelftopic will contain either the value of myshelves, or if there is none, the value of Series.

The second column shelfname will contain either the value of shelftopic or if there is none, the word Uncategorized
PeterT is offline  
Old 05-26-2013, 06:07 PM   #184
Toris
Junior Member
Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.Toris knows the square root of minus one.
 
Posts: 8
Karma: 7938
Join Date: May 2012
Device: kobo and bebook
Quote:
Originally Posted by PeterT View Post
This is probably not the cleanest way of doing it, but it seems to work.

Add a new custom column with Lookup Name shelftopic and Column Heading Shelf Topic of type Column built from other columns
Set it's template to
Code:
{#myshelves:'ifempty($, field('Series'))'}
Add another custom column with Lookup Name shelfname and Column Heading Shelf Name of type Column built from other columns
Set it's template to
Code:
{#shelftopic:'ifempty($,'Uncategorized')'}
Restart Calibre

Change the shelf options in the Kobo Driver to simply #shelfname and all should be done.

The first column shelftopic will contain either the value of myshelves, or if there is none, the value of Series.

The second column shelfname will contain either the value of shelftopic or if there is none, the word Uncategorized

Thank you very much, this is working well
Toris is offline  
Old 05-26-2013, 10:50 PM   #185
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
removed as PeterT had already answered. I don't know how I missed it.

Last edited by davidfor; 05-26-2013 at 11:22 PM.
davidfor is offline  
Advert
Old 05-27-2013, 01:13 PM   #186
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,540
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Actually, I've just tried and all of that can be done with a single custom column.

Add a custom column with Lookup Name shelfname and Column Heading Shelf Name of type Column built from other columns
Set it's template to
Code:
Code:
{#myshelves:'ifempty($, ifempty(field('Series'), 'Uncategorized'))'}
Restart Calibre

Change the shelf options in the Kobo Driver to simply #shelfname and all should be done.

This is basically the same as before, but all in a single definition.

Code:
Basically, if myshelves is non empty,
   #myshelves:'ifempty($
   return the value of myshelves, 
else if Series is non empty, 
   ifempty(field('Series')
   return the value of Series, 
else 
   'Uncategorized'
   return the word Uncategorized
=====

Even EASIER

As above but make the program
Code:
{:'first_non_empty(field('#myshelves'), field('Series'), 'Uncategorized')'}
This will simply return the first non empty argument from the list! So if myshelves has a value, that is used. If it didn't then Series is used, and if THAT was blank then 'Uncategorized' is used!

Last edited by PeterT; 05-27-2013 at 01:19 PM.
PeterT is offline  
Old 05-27-2013, 09:42 PM   #187
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by PeterT View Post
Even EASIER

As above but make the program
Code:
{:'first_non_empty(field('#myshelves'), field('Series'), 'Uncategorized')'}
This will simply return the first non empty argument from the list! So if myshelves has a value, that is used. If it didn't then Series is used, and if THAT was blank then 'Uncategorized' is used!
I thought it could be done in one column, but that is so much better.
davidfor is offline  
Old 06-01-2013, 02:38 PM   #188
AJvK
Member
AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.
 
Posts: 24
Karma: 7940
Join Date: Jun 2013
Device: Kindle Voyage, Kobo Aura (normal and HD)
Thank you for these excellent instructions! I have translated and expanded on these for a post on my own website (with attribution, of course )

I have one small addition, and one question:

1. In the part about the device driver, I have found you also need to place a checkmark in the box named Create Bookshelves. Without the checkmark, calibre wouldn't create the shelves - obvious maybe, but I rushed a bit through the steps at first, and didn't see a mention of this (I'm on calibre 0.9.33). Edit: I now see it was mentioned halfway through this thread already...

2. I have my workflow set-up to create Shelves from series and author_sort. Everything works like a charm, the only gripe I have is that the number of Shelves can / will quickly skyrocket. So my question is this: is it possible to have nested Shelves, i.e. under Shelves, first have a division in Author and Series, and below those their respective Shelves?


Last edited by AJvK; 06-01-2013 at 03:13 PM.
AJvK is offline  
Old 06-01-2013, 03:05 PM   #189
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,540
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
You're right. I never explicitly said to use the Create Bookshelves option; will go back and add that.

Support for nested shelves would have to come from Kobo themselves; nothing at all we can do for that. And unfortunately, I would not hold my breath hoping for that option to come at all soon (if ever).

** UPDATES MADE TO ORIGINAL POST **

Last edited by PeterT; 06-01-2013 at 03:14 PM.
PeterT is offline  
Old 06-01-2013, 03:16 PM   #190
AJvK
Member
AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.
 
Posts: 24
Karma: 7940
Join Date: Jun 2013
Device: Kindle Voyage, Kobo Aura (normal and HD)
Quote:
Originally Posted by PeterT View Post
Support for nested shelves would have to come from Kobo themselves; nothing at all we can do for that. And unfortunately, I would not hold my breath hoping for that option to come at all soon (if ever).
I was afraid of that... Well, thanks anyway. Maybe I'll adapt the method for adding books to one shelf or the other for my purpose - i.e. if added to a series-shelf, then it's not to be added to the author-shelf.
AJvK is offline  
Old 06-01-2013, 03:20 PM   #191
taming
Trying for calm & polite
taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.
 
taming's Avatar
 
Posts: 4,012
Karma: 9455193
Join Date: May 2010
Location: Mostly in Canada
Device: kobo original, WiFI, Touch, Glo, and Aura
Quote:
Originally Posted by PeterT View Post
Support for nested shelves would have to come from Kobo themselves; nothing at all we can do for that. And unfortunately, I would not hold my breath hoping for that option to come at all soon (if ever).
I use my "series" shelf with things like, "Sandford, Davenport" "Sandford, Flowers" , and then in the shelf column, I have "Sandford, no series". All the Sandford shelves are alphabetically gathered onto the shelf pages on the device close to each other.

I use a text field instead of comma delimited for my shelves. Not on purpose. I didn't know any better when I set it up.

Last edited by taming; 06-01-2013 at 03:23 PM.
taming is offline  
Old 06-01-2013, 03:42 PM   #192
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,540
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by AJvK View Post
I was afraid of that... Well, thanks anyway. Maybe I'll adapt the method for adding books to one shelf or the other for my purpose - i.e. if added to a series-shelf, then it's not to be added to the author-shelf.
You could probably handle this with a custom column which you would use as the source for the shelf column. Something like

Code:
{:'first_non_empty(field('Series'), field('author_sort'))'}
This would return the Series name if set, else, the author_sort field.

In case a book has no author (not sure if this IS possible) you could also use
Code:
{:'first_non_empty(field('Series'), field('author_sort'),'Uncategorized')'}
to ensure that books ended up on an Uncategorized shelf.

This would all be defined as a custom column in calibre preferences of type Column built from other columns, and then the lookup name would be used in the driver's shelf definition field (prepeneded by a # mark of course).
PeterT is offline  
Old 06-01-2013, 05:43 PM   #193
AJvK
Member
AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.AJvK knows the square root of minus one.
 
Posts: 24
Karma: 7940
Join Date: Jun 2013
Device: Kindle Voyage, Kobo Aura (normal and HD)
Quote:
Originally Posted by PeterT View Post
You could probably handle this with a custom column which you would use as the source for the shelf column. Something like

Code:
{:'first_non_empty(field('Series'), field('author_sort'))'}
This would return the Series name if set, else, the author_sort field.

This would all be defined as a custom column in calibre preferences of type Column built from other columns, and then the lookup name would be used in the driver's shelf definition field (prepeneded by a # mark of course).
Works like a charm!
AJvK is offline  
Old 06-01-2013, 05:46 PM   #194
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,540
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
So glad it worked It seemed to work in my testing, but always nice to get feedback.
PeterT is offline  
Old 06-02-2013, 03:52 AM   #195
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by PeterT View Post
You could probably handle this with a custom column which you would use as the source for the shelf column. Something like

Code:
{:'first_non_empty(field('Series'), field('author_sort'))'}
This would return the Series name if set, else, the author_sort field.

In case a book has no author (not sure if this IS possible) you could also use
Code:
{:'first_non_empty(field('Series'), field('author_sort'),'Uncategorized')'}
to ensure that books ended up on an Uncategorized shelf.

This would all be defined as a custom column in calibre preferences of type Column built from other columns, and then the lookup name would be used in the driver's shelf definition field (prepeneded by a # mark of course).
Thank you by the tip about "first_not_empty".
Terisa de morgan is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Newer kernel on Kobo Mini/Touch/Glo? BaronPampa Kobo Developer's Corner 0 12-24-2019 06:08 AM
Aura HD vs Touch vs Glo. themikeyt Kobo Reader 35 07-24-2014 05:39 PM
Touch more slow than Glo and Aura? Lucas Malor Kobo Reader 1 09-17-2013 05:54 AM
Kobo Storage Upgrade Service (Wifi, Touch, Mini, Glo, Vox) jefftheworld Kobo Reader 14 10-24-2012 01:20 PM
Adding books to Kindle with Calibre mini-guide tapar Amazon Kindle 7 12-28-2009 06:29 AM


All times are GMT -4. The time now is 01:21 AM.


MobileRead.com is a privately owned, operated and funded community.