Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-16-2024, 05:44 PM   #1
1ily
Connoisseur
1ily doesn't litter1ily doesn't litter
 
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.
1ily is offline   Reply With Quote
Old 10-16-2024, 09:37 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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):

Click image for larger version

Name:	Screenshot 2024-10-17 122253.jpg
Views:	155
Size:	116.1 KB
ID:	211449

This is what it presents:

Click image for larger version

Name:	Screenshot 2024-10-17 122502.jpg
Views:	139
Size:	77.4 KB
ID:	211450

There's also a similarly named optional plugin that provides additional capabilities that make it more accessible ==>> User Category

BR
BetterRed is offline   Reply With Quote
Advert
Old 10-16-2024, 09:45 PM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,649
Karma: 74166147
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by 1ily View Post
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?
Here's a simplified version of the template I use to populate my #kobocoll column using Action Chains' single-field edit.

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, ',');
ownedbycats is offline   Reply With Quote
Old 10-16-2024, 11:13 PM   #4
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
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, ',');
ownedbycats is offline   Reply With Quote
Old 10-16-2024, 11:15 PM   #5
1ily
Connoisseur
1ily doesn't litter1ily doesn't litter
 
Posts: 61
Karma: 190
Join Date: Sep 2023
Device: Kobo Libra 2
you guys are amazing, thank you!
1ily is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 02:08 PM.


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