Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2013, 03:43 PM   #1
Pr.BarnArt
Zealot
Pr.BarnArt began at the beginning.
 
Pr.BarnArt's Avatar
 
Posts: 148
Karma: 34
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Goodreads_rating

There were several who asked for a plugin which can get and store the decimal rating of goodreads ( and amazon).
I gave it a try, just because I like to tackle a problem. But I am not a very good programmer. So this is more or less for fun and there sure will better smarter ways.

As result I made two plugins:
1. Goodreads_rating
I changed the original plugin ( thanks to Kiwidude) just a little.
The publisher-field now contains the publishersname, followed bij '#Pr.Barnart#' and then followed by the rating of goodreads.

2. frating
At the main menu you see the option frating with an ugly icon
If clicked a dialog is shown with 2 buttons :
a. Check and create custom column.
There will be info with the results of the check.
If the column is created you have to restart calibre.

b. Set decimal rating.
This function will first check if the column exists, if no it will be created ( and you have to restart Calibre - see dialog-info when this happens).
If the column exists, the function will search for all the records with '#Pr.Barnart#' in the publisher field.
It will split those publisher-fields into publisher and rating,
the last item is placed in a custom culumn: gr_ratings
The separator '#Pr.Barnart#' will be deleted
The publisher-field will reamain just the publisher

Custom column
You can also create the custom column by the gui, use the next values.
Only the text of the label can be of your own choise.
  • name: gr1
  • label: gr_ratings
  • type: decimal or float

Use:
  • (optional) Create custom column gr1 ( see above)
  • Download the two plugins at the bottom of this message.
  • Go to preferences->plugins->load from file and install the plugins.
  • Restart calibre.
  • If there is no custom column gr1, run frating - do check and create ( and restart calibre again).
  • do a metadatasearch with the goordreads_rating plugin.
  • After that use frating : set decimal ratings.

Comments
I don't know if this is what people asked for, but maybe you will like it.
At the moment only for goodreads!

Update 0.1.2
I have made an extra button to check and create the custom colum.
That prevents for some unwanted errors.

Update 0.1.3
fix error in case no publisher is given at goodreads.

Enjoy
Attached Files
File Type: zip frating.zip (9.1 KB, 63 views)
File Type: zip goodreads_rating-0.1.3.zip (20.7 KB, 62 views)

Last edited by Pr.BarnArt; 10-06-2013 at 05:23 PM. Reason: update 0.1.3
Pr.BarnArt is offline   Reply With Quote
Old 10-02-2013, 12:57 AM   #2
Penny_Dreadful
Member
Penny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud of
 
Penny_Dreadful's Avatar
 
Posts: 16
Karma: 27758
Join Date: Aug 2009
Location: Perth, Australia
Device: Kindle Paperwhite
Thanks for this, I'd been hoping someone would create a plug-in like this.

The only problem I'm having is that any ebook that doesn't have a publisher listed on Goodreads doesn't get a rating downloaded. Out of the 574 ebooks I've run this against 166 didn't get a rating.

I'm guessing that if the publisher field comes back blank the plug-in can't write the "#Pr.Barnart# Rating" to calibre, maybe it might be better to write the "#Pr.Barnart# Rating" to a guaranteed field like Title.
Penny_Dreadful is offline   Reply With Quote
Old 10-02-2013, 02:44 PM   #3
Pr.BarnArt
Zealot
Pr.BarnArt began at the beginning.
 
Pr.BarnArt's Avatar
 
Posts: 148
Karma: 34
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Quote:
Originally Posted by Penny_Dreadful View Post
Thanks for this, I'd been hoping someone would create a plug-in like this.

The only problem I'm having is that any ebook that doesn't have a publisher listed on Goodreads doesn't get a rating downloaded. Out of the 574 ebooks I've run this against 166 didn't get a rating.

I'm guessing that if the publisher field comes back blank the plug-in can't write the "#Pr.Barnart# Rating" to calibre, maybe it might be better to write the "#Pr.Barnart# Rating" to a guaranteed field like Title.
Thanks for your comment. I am not sure if that is the problem, but I need a book/isbn without a publisher to check what is the cause of the problem .

Even is de publisher is blank, the separator and the rating should be added en frating will split them up to blank and rating.
But maybe there is a problem with the value of the publisherfield in case it is not filled. There is no need to take another field, because we can force the plugin to fill the publisher field , before adding the extra information.
I don't like to use the title or authors field, because they er also used for sorting actions.


After checking I wil give you an update, so please give me a title to check.
Pr.BarnArt is offline   Reply With Quote
Old 10-02-2013, 07:02 PM   #4
Penny_Dreadful
Member
Penny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud of
 
Penny_Dreadful's Avatar
 
Posts: 16
Karma: 27758
Join Date: Aug 2009
Location: Perth, Australia
Device: Kindle Paperwhite
Thanks for looking in to this.

These two books are both showing the same issue
http://www.goodreads.com/book/show/12430013
http://www.goodreads.com/book/show/15987754
Penny_Dreadful is offline   Reply With Quote
Old 10-03-2013, 01:01 PM   #5
Pr.BarnArt
Zealot
Pr.BarnArt began at the beginning.
 
Pr.BarnArt's Avatar
 
Posts: 148
Karma: 34
Join Date: Jun 2011
Device: Pocketbook 902 / Ipad2
Ok, thank you for the examples.

I made an update for the goodreads-rating plugin 0.1.3.
You can download it at the starttopic of this thread.
The update checks if the publsher is not known en prevents the value to be Null or None.

You can test it.
Pr.BarnArt is offline   Reply With Quote
Old 10-03-2013, 10:55 PM   #6
Penny_Dreadful
Member
Penny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud of
 
Penny_Dreadful's Avatar
 
Posts: 16
Karma: 27758
Join Date: Aug 2009
Location: Perth, Australia
Device: Kindle Paperwhite
Thank you, it's working perfectly! This is so helpful.
Penny_Dreadful is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 12:27 AM.


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