Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-18-2016, 03:29 AM   #1
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
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
It works well but I have a few question:

- 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?
Attached Thumbnails
Click image for larger version

Name:	rt1.PNG
Views:	188
Size:	12.4 KB
ID:	151712   Click image for larger version

Name:	rt2.PNG
Views:	202
Size:	19.9 KB
ID:	151713  

Last edited by oren64; 09-18-2016 at 03:45 AM.
oren64 is offline   Reply With Quote
Old 09-18-2016, 03:59 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-18-2016, 04:18 AM   #3
oren64
I need a chapter break
oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.oren64 ought to be getting tired of karma fortunes by now.
 
oren64's Avatar
 
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.
oren64 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 08:53 PM.


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