07-11-2019, 11:46 PM | #1 |
Connoisseur
Posts: 56
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
|
Automatically Add Books to Multiple Shelves on Kobo Device
Hi, is there a way to have Calibre automatically send the same books to multiple shelves?
I currently have it set up to send to my device as 'Author - Series', which works great and I don't want that to change, but I'd also like to have books with certain tags go to a shelf based on that tag as well as where it normally goes. Is this possible? Thanks |
07-12-2019, 12:41 AM | #2 |
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
|
The Kobo device drivers allow you to use a list of columns in the configuration. You can have something like:
Code:
series, tags, #somecustomcolum |
07-12-2019, 01:27 AM | #3 |
Connoisseur
Posts: 56
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
|
So essentially, if I add multiple columns in the 'Collections columns' section of the driver, separated by a comma, it would then create shelves based on data from both column 1 and column 2? I would just need to create another column based in the tags I want to use (I don't want all of them, just certain ones).
Code:
#collection_authorseries, #collection_tags I've tried both options, neither one works... Code:
{tag:contains(abc, ABC,)},{,tag:contains(xyz,XYZ,)} Code:
{tag:contains(abc, ABC,),tag:contains(xyz,XYZ,)} Last edited by tamarissa; 07-12-2019 at 01:46 AM. Reason: Updating Question |
07-12-2019, 03:50 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
|
Quote:
|
|
07-12-2019, 12:27 PM | #5 | |
Connoisseur
Posts: 56
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
|
Quote:
Correct: Code:
{tag:contains(abc, ABC,)},{tag:contains(xyz,XYZ,)} I have the column set up as "Columns built from other columns, behaves like tags". I've tried it with just the "Columns built from other columns" but it didn't work there either. The first part now has my read status (custom column) added in front, and the rest added after, and still works: Code:
{#read_status} - {tag:contains(abc, ABC,)},{tag:contains(xyz,XYZ,)} What I want is the result of: Read - ABC or Read - XYZ or Unread - ABC or Unread - XYZ. I'm only looking for one tag value in the column, so if the first condition is met, it doesn't need the rest, or if the first criteria isn't met, but the second one is met, it doesn't need the rest & so on and so forth. In my mind, it would look like this, but that doesn't work: Code:
{#read_status} - {tag:contains(abc, ABC,tag:contains(xyz,XYZ,))} Is this possible? And which column type would it require if so? NOTE - I speak 'Excel', and it's a nested IF function I'm looking to duplicate here... maybe that will make my meaning clearer if you (or anyone else) knows what that is. The If-then-else "contains(val, pattern, text if match, text if not match)" option I'm currently using is as close as I've been able to find. The List Lookup "in_list(val, separator, pattern, found_val, ..., not_found_val)" sounds like it might be what I want, but I can't make it work for me. |
|
07-13-2019, 02:29 AM | #6 |
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 think I know what you want:
Print the reading status followed by a dash and a tag. The tag to print is the first of a set of preferred tags. And that tag is uppercased. I have made a couple of assumptions: - The status column always has a value - The tag won't always be there The first version, based on what you have done is: Code:
{#status}{:'uppercase(first_non_empty(contains(field("tag")," - Mystery", "MYSTERY",""),contains(field("tag"),"Science Fiction", " - SCI FI","")))'} A better version for adding more tags is: Code:
{#status:}{:'uppercase(list_item(list_intersection(field("tag"),sublist("Mystery,Science Fiction",0,0,","), ","),0,","))'| - |} This is the version I would use as I order the tags in importance. Swapping the tag and the list of matches, would achieve the same as the first example. So: Code:
{#status:}{:'uppercase(list_item(list_intersection(sublist("Mystery,Science Fiction",0,0,","),field("tag"), ","),0,","))'| - |} |
07-19-2019, 03:01 AM | #7 |
Connoisseur
Posts: 56
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
|
The second option you provided worked out the best for me, so thanks for that, I really appreciate it! The third one didn't let me add more than 2 tags; not sure it was supposed to or not.
One more question for you though regarding that formula: Code:
{#status:}{:'uppercase(list_item(list_intersection(field("tag"),sublist("Mystery,Science Fiction",0,0,","), ","),0,","))'| - |} Thanks |
07-19-2019, 03:06 AM | #8 |
Connoisseur
Posts: 56
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
|
The second option you provided worked out best for me, so thanks for that... I really appreciate it. The third one didn't let me add more than 2 tags; not sure it was supposed to or not.
One more question for you... Code:
{#status:}{:'uppercase(list_item(list_intersection(field("tag"),sublist("Mystery,Science Fiction",0,0,","), ","),0,","))'| - |} Thanks again! |
Tags |
shelves |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Kobo] Sending multiple books to device : one error stops all | CalibrePegasus | Devices | 6 | 01-06-2019 08:52 PM |
How to add shelves (Kobo) in Calibre | bartveld | Calibre | 2 | 11-25-2012 11:29 AM |
Best way to automatically add a lot of books | foxbooks | Library Management | 3 | 05-31-2012 11:41 AM |
Can I automatically add multiple books to my Caibre library? | BIGDAVE | Library Management | 2 | 10-29-2011 07:21 PM |
<Command Line> Add multiple books in multiple formats | himitsu | Calibre | 8 | 09-26-2010 12:07 AM |