View Single Post
Old 09-19-2016, 01:37 AM   #6
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Thanks for the replies

There seems to be a misunderstanding, I wasn't suggesting the #my_ratings column be a composite column, that's why I wrote:- "...have a custom rating column (#my_rating)..."

I then went on to write:- "I need to extend the [ composite column ] #read_count's existing template [ {#date_read_history:count(,)} ] to compute the value of [ the rating column ] #my_rating."

Should have written, "I think I need to extend"

Regarding plugins:- I don't really want to have my own plugins, firstly I have no programming skills, nor much of an inclination to acquire them, and secondly I would have to maintain them when a change to calibre or something (Qt, Windows etc) causes problems.

Here's my detailed reply:

Quote:
Originally Posted by Terisa de morgan View Post
For me, this is not a template but a program (I feel more comfortable with it):

Code:
if (read_count < 10):
  rating = (read_count - 1) / 2 + 1
else:
  rating = 10
But I'm not so sure that a rating column could be a composite column.
Q: Can a template for a custom composite column set the value of a custom Ratings column?

If the answer to that is Yes then:

Could the template of the composite column #read_count be recoded into Program Mode, and could the logic of your code fragment be included it, and if so how ? Maybe it needs a python function - example only: https://www.mobileread.com/forums/sho...02&postcount=1

Baby steps please

If the answer is No, then I need to consider the options - like do nothing.

==================================

Quote:
Originally Posted by chaley View Post
It is especially hard to display 1/2 star ratings. CC will never display them as anything except numbers.
Will CC display the half stars for a custom Ratings column ?

Quote:
Originally Posted by chaley View Post
A plugin could look at the values in read_count and set a custom rating column to the "right" value.
Why in a plug-in and not in the read_count composite column template which already exists and already works ?

Quote:
Originally Posted by Terisa de morgan View Post
... You would need to configure:
  • column for read_count
  • column for rating
I already have the columns, see attachment

Quote:
Originally Posted by Terisa de morgan View Post
The first "fulfill" of columns could be done with search and bulk metadata edit. For example: read_count:<=2 and rating:false => Assign 1 to rating... And so on.
Rating columns (built in and custom) can't be accessed in Bulk Metadata Search and Replace

Quote:
Originally Posted by Terisa de morgan View Post
Rereading chaley's message I've been aware that I'm too "up-to-date". I still have a column which makes something similar (composite and stars....), that I've been using for showing half stars.

You can define the function for "my_ratings" and, instead of using the standard rating columns with stars that calibre shows", you can define icons for the column associated to its value, so you can get the same effect.
Column icons don't show in CC - that's why I want to use a custom Ratings column

Tanjamuse
Attached Thumbnails
Click image for larger version

Name:	Capture.jpg
Views:	123
Size:	29.4 KB
ID:	151740  
Tanjamuse is offline   Reply With Quote