View Single Post
Old 04-16-2023, 07:44 AM   #582
Levinas2021
Junior Member
Levinas2021 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2021
Device: Kobo Clara
The code would be something like this?

python:
def evaluate(book, context):
context.db.new_api.get_custom_book_data('#ranking' )
vals = sorted([float(v) for v in vals], reverse=True)
return str(1 + vals.index(float(book.get('#ranking'))))
Levinas2021 is offline   Reply With Quote