|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Connoisseur
![]() ![]() Posts: 61
Karma: 190
Join Date: Sep 2023
Device: Kobo Libra 2
|
Is there a way to populate a column based on the contents in a tag column?
I have a separate column for my tags and my shelves, and my shelves are automatically imported to my kobo as collections.
I want to populate my shelf column based on the tags that get pulled from any download metadata. I use the tags column to populate the subtitle on my kobo, so I want it separate from my collections. Anyone have any ideas? So some example tag column values: Book 1: Fantasy, Humor, Adult Book 2: High Fantasy Book 3: Comedy, First Love, Young Adult Book 4: Fairy Tales; Folk Tales; Legends & Mythology; Legends & Mythology Example collection values: Book 1: Fantasy, Comedy Book 2: Fantasy Book 3: Comedy, Romance Book 2: Fantasy Last edited by 1ily; 10-16-2024 at 05:53 PM. |
![]() |
![]() |
![]() |
#2 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,613
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
User Category perhaps, this is how you get to it (afaik, there's no toolbar/menu item):
This is what it presents: There's also a similarly named optional plugin that provides additional capabilities that make it more accessible ==>> User Category BR |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,649
Karma: 74166147
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
Code:
program: subjects = $#subjects; admintags = $#admintags; existing_colls = $#kobocoll; new_colls = strcat( if 'omnibus' inlist admintags then 'Omnibus,' fi, if 'OVERDRIVE' inlist approximate_formats() then 'Loans,' fi, if $#booktype=='Fanfiction' then 'Fanfiction' fi, if '^Cozy Mystery$' inlist subjects then 'Cozy Mysteries,' fi, if '(Juvenile|Young Adult)' inlist subjects then 'Juvenile & Young Adults,' fi, if '^(Fantasy|Paranormal|Science Fiction)$' inlist subjects then 'Fantasy & Sci-Fi,' fi, ); merged_colls = list_union(new_colls, existing_colls, ','); |
|
![]() |
![]() |
![]() |
#4 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,649
Karma: 74166147
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
For your example, you don't need to match every specific tag - without the anchors (see the 'cozy mystery' line in the above post), 'fantasy' will match both fantasy & high fantasy, for example.
Code:
program: subjects = $tags; ## Replace this with your collection column existing_colls = $#kobocoll; new_colls = strcat( if '(Comedy|Humor)' inlist subjects then 'Comedy,' fi, if '(Fantasy|Mythology)' inlist subjects then 'Fantasy,' fi, if '(Romance|Love)' inlist subjects then 'Romance,' fi, ); merged_colls = list_union(new_colls, existing_colls, ','); |
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() Posts: 61
Karma: 190
Join Date: Sep 2023
Device: Kobo Libra 2
|
you guys are amazing, thank you!
![]() |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Looking for how to create a custom column based on a tag | kaufman | Library Management | 10 | 02-12-2014 11:15 AM |
Custom column returns value based on value of another custom column? | calvin-c | Calibre | 3 | 09-14-2013 02:24 PM |
how to move value(s) of tag column to a custom made column | zoorakhan | Library Management | 0 | 12-08-2012 03:53 AM |
Automatically tag based on column info? | Iocane | Library Management | 3 | 09-10-2012 12:40 PM |
Need help with programming a column based on previous data in the same column | seaquay | Library Management | 2 | 06-13-2012 12:19 PM |