Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-11-2019, 10:46 PM   #1
tamarissa
Member
tamarissa began at the beginning.
 
Posts: 18
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
tamarissa is offline   Reply With Quote
Old 07-11-2019, 11:41 PM   #2
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: 16,979
Karma: 26408020
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
The Kobo device drivers allow you to use a list of columns in the configuration. You can have something like:

Code:
series, tags, #somecustomcolum
That would put each book in a collection for the series it is in, collections for each tag and a collection for the value that is in the column "#somecustomcolum".
davidfor is offline   Reply With Quote
Old 07-12-2019, 12:27 AM   #3
tamarissa
Member
tamarissa began at the beginning.
 
Posts: 18
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
Also, I can get one tag into the column just fine, but when I try to add a second one it breaks the template:

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 12:46 AM. Reason: Updating Question
tamarissa is offline   Reply With Quote
Old 07-12-2019, 02:50 AM   #4
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: 16,979
Karma: 26408020
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
Quote:
Originally Posted by tamarissa View Post
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
Also, I can get one tag into the column just fine, but when I try to add a second one it breaks the template:

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,)}
The configuration field in the driver is a comma separated list of column lookup names. It does not allow templates. If you want to do something like that, you will need to create a column with that template, then use the column in the driver configuration.
davidfor is offline   Reply With Quote
Old 07-12-2019, 11:27 AM   #5
tamarissa
Member
tamarissa began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
Quote:
The configuration field in the driver is a comma separated list of column lookup names. It does not allow templates. If you want to do something like that, you will need to create a column with that template, then use the column in the driver configuration.
Sorry, I thought I had made myself clear that I was making a column by stating that I could get one tag into the column, but not two, but I guess not. I'll try again. I figured out the issue though (extra comma that messed it up).

Correct:
Code:
{tag:contains(abc, ABC,)},{tag:contains(xyz,XYZ,)}
However, it still isn't doing quite what I want it to do...
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,)}
This gives me the result of: Read - ABC,XYZ or Unread: ABC,XYZ (if more than one tag meets the criteria).
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.
tamarissa is offline   Reply With Quote
Old 07-13-2019, 01:29 AM   #6
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: 16,979
Karma: 26408020
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
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","")))'}
If you are after more than two tag, then add an extra "contains". I don't like that, but, it works if you want to rename the tag to something else. The order of the "contains" are important. If you have both "Mystery" and "Science Fiction" in the tags, it will always return "MYSTERY".

A better version for adding more tags is:

Code:
{#status:}{:'uppercase(list_item(list_intersection(field("tag"),sublist("Mystery,Science Fiction",0,0,","), ","),0,","))'| - |}
With this, it finds the first match in tags or the values. That means if your tags are "Mystery,Science Fiction", the result will be "MYSTERY" and if it is "Science Fiction,Thriller,Mystery", it will be "SCIENCE FICTION". And adding another tag just means adding another to the list.

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,","))'| - |}
davidfor is offline   Reply With Quote
Old 07-19-2019, 02:01 AM   #7
tamarissa
Member
tamarissa began at the beginning.
 
Posts: 18
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,","))'| - |}
Is there any way to just leave the field empty if there is no matching tag? IE - no "read status" value added to the column if there are no tags found; it just remains completely blank. It's only 2 extra shelves created (all read books and all unread books), so not a huge a deal if that can't be done.

Thanks
tamarissa is offline   Reply With Quote
Old 07-19-2019, 02:06 AM   #8
tamarissa
Member
tamarissa began at the beginning.
 
Posts: 18
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,","))'| - |}
Is it possible to have it leave the column blank if no tags are found? It's only 2 extra shelves (all read books and all unread books), so not a big deal if it can't; I'm just a minimalist and don't like things I don't need.

Thanks again!
tamarissa is offline   Reply With Quote
Reply

Tags
shelves

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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 07:52 PM
How to add shelves (Kobo) in Calibre bartveld Calibre 2 11-25-2012 10:29 AM
Best way to automatically add a lot of books foxbooks Library Management 3 05-31-2012 10:41 AM
Can I automatically add multiple books to my Caibre library? BIGDAVE Library Management 2 10-29-2011 06:21 PM
<Command Line> Add multiple books in multiple formats himitsu Calibre 8 09-25-2010 11:07 PM


All times are GMT -4. The time now is 04:44 PM.


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