Today one can use custom icons for each tag browser category. From time to time I see a discussion about whether one can also use custom icons per category value.
The latest was here.
One can apparently do it with the Job Spy plugin. Using Job Spy concerns me because a) the plugin seems to no longer be maintained, and b) to work it would need to reach deep into the tag browser code, making it fragile.
I am considering adding this ability to base calibre. I don't think any "naming" scheme where the name of an icon specifies where it is used can work. There are too many category/value pairs, perhaps thousands, meaning icons could be duplicated thousands of times. I don't think a "rule" system such as used for column icons is practical for the same reason; one could end up with thousands of rules. A template scheme permits grouping and defaulting based on how the user thinks. One could even use subtemplates to make maintaining the icons used for a given category an easier task.
If I go forward then there would be an option somewhere to specify a template that given a category and a value returns the name of an icon. If the template returns the empty string then the default icon (what you see today) would be used. The template would not have access to information about books.
The biggest question for me is "where are the icons stored?" I think that they should be in a subfolder of the tb_icons folder, perhaps named something like "##category_icons##". The template would return an icon name, which must be found in that folder. The user is in charge of names, using any scheme desired. Further subfolders would be permitted. The user is in charge of theming (light or dark), using different names such as 'aaa-light.png' and 'aaa-dark.png' for the value 'aaa'.
Questions:
- Would something like this be useful for more than 10 people?
- Is it too complicated to be of general use?
- Do any of you have a different proposal for how to specify an icon for a category/value pair?