![]() |
#1 |
I need a chapter break
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
|
Build Custom Stars Rating Column.
I build custem stars column (text) from number float column using this function.
Code:
def evaluate(self, formatter, kwargs, mi, locals, r): try: m = float (r) n = int(m) if 0.00 <= m - n <= 0.25: x = n * '★' if 0.25 < m - n <= 0.75: x = n * '★' +'½' if 0.75 < m - n <= 1.00: x = (n+1) * '★' except: x = '' return x - Is there a way to use an half star in text? - The funny thing is that in the catrgory is show half stars rating, but it doesn't show any books. - From 2.67 there is half star option in the custem star column, can I build star column from float column? Last edited by oren64; 09-18-2016 at 03:45 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just create a custom rating column with half stars then click on each entry in your existing rating column in the tag browser and use the bulk metadata edit dialog to apply that rating value to the new column.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
I need a chapter break
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,042
Karma: 56058267
Join Date: Mar 2015
Location: Israel
Device: Kobo Glo
|
Thanks kovidgoyal, I didn't think of that.
But the good thing aboat star function, is that whan i download rating matadata as flaot number (with Goodread_rating) it automaticly create rating in stars, too bad there isn't an option to build column stars. Last edited by oren64; 09-18-2016 at 04:22 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column - Rating | twstdwspr | Library Management | 7 | 09-24-2015 08:14 PM |
Decimal "Rating" column (Custom) and Stars | Chris_Snow | Library Management | 6 | 04-06-2015 12:25 PM |
Custom Column Build from other Columns | Tanjamuse | Library Management | 7 | 10-16-2014 01:28 AM |
Using "Build column from other column" custom-column type | HFC3 | Library Management | 3 | 07-07-2013 03:11 AM |
Calibre rating column displays lines not stars | greenlees | Calibre | 3 | 12-06-2012 02:27 PM |