Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 04-12-2023, 11:21 AM   #1
Levinas2021
Junior Member
Levinas2021 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kobo Clara
Multiplication of values from the "GR Ratings" and "GR Votes" columns

Hello Everyone!

Does anyone know what formula should be used in Calibre to return in a column the final result of the multiplication of values from the "Goodreads Ratings" and "Goodreads Votes" columns?

I'm using the Goodreads metadata plugin to get Goodreads Rating and Votes into to custom columns following these instructions: https://github.com/kiwidude68/calibr...custom-columns

Thank you in advance for your support!
Levinas2021 is offline   Reply With Quote
Old 04-12-2023, 02:56 PM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,839
Karma: 62032373
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
This template should do it.

Code:
program:
## Change these to your own columns.
ratings = $#ratingcol;
votes = $#votecol;

## This multiplies 'ratings' with 'votes' and then formats the number to use 2 decimal points.
format_number(multiply(ratings,votes), '{0:5.2f}')

## Alternately, delete the above line and uncomment this if you want it rounded to nearest whole.
## round(multiply(ratings,vote))
Replacing the first four lines with these skips a step and pulls right from the ID columns:

Code:
program:
ratings = select($identifiers, 'grratings');
votes = select($identifiers, 'grvotes');
Here is all the available arithmetic functions for template:
https://manual.calibre-ebook.com/gen...tml#arithmetic

Last edited by ownedbycats; 04-12-2023 at 03:14 PM. Reason: Added link to ref
ownedbycats is offline   Reply With Quote
Old 04-12-2023, 05:56 PM   #3
Levinas2021
Junior Member
Levinas2021 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kobo Clara
It worked

It worked fine!

Thank you!

Levinas2021 is offline   Reply With Quote
Reply

Tags
columns, goodreads, ratings, votes


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressing "Restore Defaults" under "Book Details" wipes all "Look & Feel" settings. MarjaE Library Management 1 03-30-2021 11:46 AM
Where are stored "columns views" and "Virtual Libraries"? un_pogaz Library Management 4 04-28-2018 05:46 AM
No data in "In Library" and "On Device" columns after upgrade ily426 Library Management 8 04-03-2011 02:53 PM


All times are GMT -4. The time now is 02:36 PM.


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