View Single Post
Old 11-05-2017, 06:54 PM   #1
kaoruAngel
Junior Member
kaoruAngel began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2017
Device: Android
Question Showing template-computed columns as [rating] stars isn't possible?

The Context (if you must know)
Spoiler:
I've created some custom fields, in order to be able to distinguish between the three different classes of rating judgements that matter.

For my Calibre usage, the standard `rating` field isn't worthwhile to store one's own personal ratings in, since it will also inevitably serve as the intermingled, standard dumping ground for any other rating source; so I keep that as is.

For my personally assigned ratings, I have two concrete rating fields created:
  • one for premature ratings, that, at worst, I might even dole out after a mere skimming, or based on the reputation the text already holds personally within my mind (before I've gotten to read it)
  • another for final ratings (those that I've assigned only after having read the parts of the text that I was interested in).

For some common simple display and sorting purposes, however, I use a pseudo-field: a simple template program that surfaces either the final rating (if one has been given), or the possibly void premature rating otherwise.
Code:
program: first_non_empty( field('#theFinalRatingFieldNameHere'), field('#thePrematureRatingFieldNameHere') )


The Question
Calibre seemingly doesn't try to recognize if the source of a pseudo-field's output has a special display mode already designated; and alternatively, I can't find a way to explicitly specify that this pseudo-field's column is a rating (the column type is either "ratings, shown with stars", which doesn't allow inputting a template but shows as a rating, or it's a "column built from other columns", which does allow inputting a template but doesn't get interpreted as a rating and appropriately shown with rating stars).

Am I missing something?
Attached Thumbnails
Click image for larger version

Name:	rating_field_screenshot.PNG
Views:	282
Size:	12.3 KB
ID:	159835  

Last edited by kaoruAngel; 11-05-2017 at 06:55 PM. Reason: Wrong thread icon
kaoruAngel is offline   Reply With Quote