Hi Kovid,
I have a python script working that gets the Amazon rating for every book in the Calibre DB via ISBN and then updates the meta information using this rating. I did this using the "show_metadata --as-opf" to get the original info and then updating it with "set_metadata". If I give a rating of 4, the book gets 2 stars. A rating of 8 gets 4 stars. Is this expected behaviour? The amazon rating is actually a float which I round to an int as thats what it looked like calibre was expecting. Are these the only acceptable values?:
0 - 0 stars
2 - 1 star
4 - 2 stars
6 - 3 stars
8 - 4 stars
10 - 5 stars
Also, I am adding a link to the Amazon review page in the dc:description field. This would show a hotlink to the books amazon review page when viewing the book info summary in stanza. Unfortunately the URL is not getting added when I do the set_metadata. Is html stripped from the opf file for this operation? The funny thing is that Pilotbob's post
https://www.mobileread.com/forums/showpost.php?p=286521&postcount=25 would suggest otherwise.
Cheers,
Crazy