View Single Post
Old 04-02-2023, 05:36 AM   #939
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Ma'am-I-Am View Post
OK, I searched and OMG this makes my head hurt and my eyes cross. So I'm just gonna ask.
When I know a book is retail, I tag it "Retail" or "Retail EPUB", etc.. Foolishly, I have tons of duplicate books - some retail, some not.
I want to create a column which will search each book's tags and - if certain tags are found, such as "Retail" - will populate that column with that found tag.
The goal is to quickly compare duplicate books to see which version is retail.

Can anyone help? If you have a better way to achieve my goal, say so!
Approach 1: a custom column with a template. I can understand that idea making your head hurt. You might want to look at Approach 2 below first.

Custom column:
Steps:
  1. Create a new "Column built from other columns, behaves like tags". Name it whatever you want.
  2. Use this as the template.
    Code:
    program:
    	list_intersection($tags, 'Retail, Retail EPUB, whatever', ',')
  3. Ensure that the string 'Retail, Retail EPUB, whatever' contains all the tags of interest. Each tag is separated by a comma. Spelling must be exact, but letter case doesn't matter.
The new column will show the tags from the list that are in the book.

Approach 2: use a column icon to mark books with any of the tags of interest. This image shows what it might look like using a downloaded icon on the title column.

Click image for larger version

Name:	Clipboard03.jpg
Views:	209
Size:	15.2 KB
ID:	200735

Steps to do this:
  1. Find an icon you want to use. Easiest is an online search. The icon should be square, 128x128 pixels (a bit bigger is OK). One icon site is https://www.iconfinder.com/.
  2. Download the icon to a place you can easily find it. I usually use my desktop.
  3. In calibre, go to Preferences / Look & feel / Column icons.
  4. Click the Add rule button.
  5. Use the "Add icon" button to add the downloaded icon to calibre.
  6. For the rest of the dialog:
    • "Set the:" box: icon with text
    • "of the column:" box: Title (or whichever column you want)
    • "To:" the icon you downloaded
    • Only if the following conditions are all satisfied:
      • Choose "Tags" for first box: "If the ...
      • Choose "has" for the second box.
      • Enter the list of tags of interest into the third box, for example "Retail, Retail EPUB", separated by commas. Again, the spelling must be exact but letter case doesn't matter.
      • Press OK, then Apply.
      My example dialog looks like this:
      Click image for larger version

Name:	Clipboard04.jpg
Views:	215
Size:	64.4 KB
ID:	200736
chaley is offline   Reply With Quote