Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-05-2017, 02:51 PM   #1
madeleinelevy
Enthusiast
madeleinelevy began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Jun 2014
Device: Paperwhite
Add Column Icon to all Author’s Books if…

Let’s say my database contains 10 books by author John Smith. One of these books won a notable award, and is therefore tagged “winner”. This tag will allow for an icon to be added next to his name.

Is there a way to mark all remaining books by the same author with a second icon signify that this is an author of some importance, but without adding an extra tag?

I understand that I could simply add an additional tag to all non-winning books, even something simple such as a + sign, but that might require some maintenance down the line that I would prefer to avoid.

Example included.
Attached Thumbnails
Click image for larger version

Name:	Calibre.png
Views:	255
Size:	22.3 KB
ID:	157735  
madeleinelevy is offline   Reply With Quote
Old 07-05-2017, 02:56 PM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Sorry, what "database" are you referring to? If your question relates to a specific device or tool, you should ask it in the appropriate forum for that device or tool. Nobody is going to know what you're talking about if you ask here.
HarryT is offline   Reply With Quote
Advert
Old 07-05-2017, 04:33 PM   #3
Cinisajoy
Just a Yellow Smiley.
Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.
 
Cinisajoy's Avatar
 
Posts: 19,161
Karma: 83862859
Join Date: Jul 2015
Location: Texas
Device: K4, K5, fire, kobo, galaxy
Quote:
Originally Posted by HarryT View Post
Sorry, what "database" are you referring to? If your question relates to a specific device or tool, you should ask it in the appropriate forum for that device or tool. Nobody is going to know what you're talking about if you ask here.
It looks like Calibre, but I'm not sure.
Cinisajoy is offline   Reply With Quote
Old 07-06-2017, 02:41 AM   #4
Katja_hbg
Groupie
Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.Katja_hbg can grok the meaning of the universe.
 
Posts: 167
Karma: 158116
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
Does this help
In setting choose first icon. last tab will be «colum symbol»
Add rule eg. add icon without text, into column xx, if column yy is equal zz
Katja_hbg is offline   Reply With Quote
Old 07-06-2017, 02:54 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I think it's Calibre and thus the thread should be moved. The screen grab looks like it's Calibre.
JSWolf is offline   Reply With Quote
Advert
Old 07-07-2017, 12:40 AM   #6
madeleinelevy
Enthusiast
madeleinelevy began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Jun 2014
Device: Paperwhite
Oh dear..

Should have payed more attention, I thought I was in the Calibre Forum.
Sorry about that.

Can someone move it over or do I need to re-post elsewhere?

Thanks
madeleinelevy is offline   Reply With Quote
Old 07-07-2017, 12:41 AM   #7
madeleinelevy
Enthusiast
madeleinelevy began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Jun 2014
Device: Paperwhite
Thanks Katja. Will Work on it.
madeleinelevy is offline   Reply With Quote
Old 07-07-2017, 01:48 AM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Moved to the Calibre forum.
HarryT is offline   Reply With Quote
Old 07-07-2017, 03:09 AM   #9
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: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
If I understand the question properly then the answer is no. Calibre's column icon and column coloring feature uses the template language, which can interrogate the metadata for the book in question, not other books that share metadata. In other words, the template language cannot answer the question "does some other book by this author have the XXX tag?"

That said, one of DaltonST's plugins might be able to help. They provide a large grab bag of features. I have no idea if one of them might be a way to express cross-book queries.

If you choose to go with adding information (the "tag"), I suggest that you dedicate a custom column to it. That way you don't pollute the tags with what is really administrative information. It also could make maintenance easier.
chaley is offline   Reply With Quote
Old 07-07-2017, 03:48 AM   #10
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: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
If I understand the question properly then the answer is no. Calibre's column icon and column coloring feature uses the template language, which can interrogate the metadata for the book in question, not other books that share metadata. In other words, the template language cannot answer the question "does some other book by this author have the XXX tag?"

That said, one of DaltonST's plugins might be able to help. They provide a large grab bag of features. I have no idea if one of them might be a way to express cross-book queries.

If you choose to go with adding information (the "tag"), I suggest that you dedicate a custom column to it. That way you don't pollute the tags with what is really administrative information. It also could make maintenance easier.
@chaley - can this be done (maybe we've been here before)
  • create a User Category for Important Authors,
  • interrogate the Important Authors list in a true/false composite column template (function mode maybe ?) -- #is_important/Is Important
  • then use the value of the #is_important composite column in the icon rule.
BR

Last edited by BetterRed; 07-07-2017 at 03:51 AM.
BetterRed is offline   Reply With Quote
Old 07-07-2017, 04:26 AM   #11
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: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
@chaley - can this be done (maybe we've been here before)
  • create a User Category for Important Authors,
  • interrogate the Important Authors list in a true/false composite column template (function mode maybe ?) -- #is_important/Is Important
  • then use the value of the #is_important composite column in the icon rule.
BR
You are correct, this can work, but I make no guarantees about performance. It could be very slow, depending on how well calibre's caching works.

To fill out your example:
  1. Create a user category, which for this example we will call 'Important Authors'. This should not be a hierarchical category.
  2. Put some authors into the new user category.
  3. Make a custom column "built from other columns. Name it whatever you want. For this example I will use #important. Set "Show Checkmarks" if you want visible confirmation. Set the template to
    Code:
    {:'str_in_list(user_categories(), ',', 'Important Authors', 'Yes', 'No')'}
  4. Create a rule that checks #important for "Yes".
Note that this technique will work with any category value you put in the user category. For example, if you put a series into the category then #important will be "Yes" for all books in that series.

If you want to use a hierarchical category then two things must be true.
  1. The outermost category name (Important Authors) must be unique. It cannot be a substring of any other category or subcategory name.
  2. Use this template:
    Code:
    {:'contains(user_categories(), 'Important Authors', 'Yes', 'No')'}
chaley is offline   Reply With Quote
Old 07-07-2017, 04:51 AM   #12
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: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@chaley -

@madeleinelevy - I hope this gives you what you want.

I suggest you install the User Categories plugin, it will allow addition and removal of Authors to/from the Important Authors UC from the book list, thus avoiding having to dodge in and out of the Tag Browser->Configuration menu when you want to add or remove an Author to the list. I find it works best from the context menu.

BR
BetterRed is offline   Reply With Quote
Old 07-07-2017, 05:03 AM   #13
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: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
@chaley -
Thinking about it, one can avoid making the composite column by using an advanced rule in coloring/icons.
Quote:
I suggest you install the User Categories plugin, it will allow addition and removal of Authors to/from the Important Authors UC from the book list, thus avoiding having to dodge in and out of the Tag Browser->Configuration menu when you want to add or remove an Author to the list. I find it works best from the context menu.

BR
I use drag-n-drop. Click on the "thing" (the author, series, what-have-you), release the click, then click/drag that value onto the user category name in the tag browser.
chaley is offline   Reply With Quote
Old 07-07-2017, 05:47 AM   #14
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: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@chaley - l'll let the OP try the Advanced Rule route.

I implemented the custom column solution on an 8347 book library, start up time was 5.5 secs - library is on WD Caviar Black HDD, config is on a Toshiba HG6 SSD. That seems good enough to me.

Because it's not keyboard navigable I rarely show the tag browser tree - unless of course I want to Manage Authors, Tags etc. When I first started using calibre it sort of was, as was book details - sort of


Can anyone tell me what the following line in debug is about. I haven't had an Apple anything since a IIe and Lisa 30 years ago, and I have never installed the Fanficfare plugin. And the file doesn't exist, see attachment

macmenuhack file_path:C:\_Calibre\Configuration_64bit\plugins\ fanficfare_macmenuhack.txt.

calibre Debug log
Spoiler:
calibre 2.85.1 [64bit] embedded-python: True is64bit: True
Windows-8-6.2.9200 Windows ('64bit', 'WindowsPE')
('Windows', '8', '6.2.9200')
Python 2.7.9
Windows: ('8', '6.2.9200', '', 'Multiprocessor Free')
DEBUG: 0.0 GetFileName::__init__.py - loading translations
DEBUG: 0.0 GetFileName::__init__.py - loading translations
Successfully initialized third party plugins: Drop Search Results (1, 0, 8) && EpubCheck (0, 1, 2) && Quality Check (1, 9, 11) && Count Pages (1, 8, 0) && GetFileName (0, 0, 12) && Favourites Menu (1, 0, 4) && Resize Cover (1, 0, 3) && Extract ISBN (1, 4, 4) && Diaps Editing Toolbag (0, 3, 4) && Generate Cover (1, 5, 21) && EpubMerge (2, 1, 1) && Modify ePub (1, 3, 13) && View Manager (1, 3, 2) && Barnes & Noble (1, 2, 14) && Find Duplicates (1, 6, 3) && EpubSplit (2, 2, 1) && Reading List (1, 6, 6) && Goodreads (1, 1, 12) && Beam Ebooks (1, 0, 0) && User Category (1, 5, 3)
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 94.1467181467 x 94.0740740741
Starting up...
EpubMerge: DEBUG: 2017-07-07 19:03:42,163: calibre_plugins.epubmerge.epubmerge_plugin(152): macmenuhack file_path:C:\_Calibre\Configuration_64bit\plugins\ fanficfare_macmenuhack.txt
Started up in 5.49 seconds with 8347 books


BR
Attached Thumbnails
Click image for larger version

Name:	4.JPG
Views:	194
Size:	78.2 KB
ID:	157766  

Last edited by BetterRed; 07-07-2017 at 05:50 AM.
BetterRed is offline   Reply With Quote
Old 07-07-2017, 07:38 AM   #15
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: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
@chaley - l'll let the OP try the Advanced Rule route.
The attached image shows how to do it with an advanced rule.

Here is the template text shown in the image. The "Foo Bar" is there because that is the name of my test user category.
Code:
program:
	contains(user_categories(), 'Foo Bar', 'ok.png', '')
The advanced rule must return the name of an icon file, in this example ok.png, or the empty string for no icon.
Attached Thumbnails
Click image for larger version

Name:	Clipboard03.jpg
Views:	224
Size:	73.4 KB
ID:	157772  
chaley is offline   Reply With Quote
Reply

Tags
column, icon, preferences, rule


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Column to filter books by author mariaclaudia Calibre 1 06-12-2016 11:32 AM
Add tag from author and specific column P.K.Dick Library Management 1 10-13-2014 03:20 PM
add books - author FN/ LN issue - kindle books cybmole Calibre 2 01-29-2014 03:07 PM
Calibre will only add 2 books from same author onto KF Hope Kindle Fire 1 01-11-2012 10:24 AM
Add Books Author Problem PCreighton Calibre 2 09-03-2010 07:18 PM


All times are GMT -4. The time now is 03:41 PM.


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