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 08-07-2018, 02:13 PM   #1141
Iceybones
Junior Member
Iceybones began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: Kindle PW3
Hey guys. What would it take to get this plugin to scrape the ASIN from goodreads? All my books are linked to a kindle edition that has an ASIN listed. Should be pretty straightforward right? For me to just do it myself I mean. Could it be as easy as just tweaking the function that grabs the isbn for a paperback book?

Last edited by Iceybones; 08-07-2018 at 05:32 PM.
Iceybones is offline   Reply With Quote
Old 08-07-2018, 05:32 PM   #1142
Iceybones
Junior Member
Iceybones began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: Kindle PW3
I think I've narrowed it down to this block of code. Thoughts?

Quote:
Code:
goodreads_edition_book['goodreads_isbn'] = ''
            isbn_node = edition_data_node.xpath('div[@class="moreDetails hideDetails"]/div[@class="dataRow"][2]/div[@class="dataValue"]/span[@class="greyText"]/text()')
            if len(isbn_node) > 0:
                isbn = None
                match_isbn = re.search(': (\d+)', isbn_node[0])
                if not match_isbn:
                    match_isbn = re.search('(\d+)', isbn_node[0])
                if match_isbn:
                    isbn = match_isbn.groups(0)[0]
                    if check_isbn(isbn):
                        goodreads_edition_book['goodreads_isbn'] = isbn
            goodreads_edition_books.append(goodreads_edition_book)

Last edited by PeterT; 08-07-2018 at 07:19 PM. Reason: added code block to preserve indentation
Iceybones is offline   Reply With Quote
Old 08-07-2018, 09:41 PM   #1143
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 15,090
Karma: 24708566
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE, Clara HD
Quote:
Originally Posted by Iceybones View Post
I think I've narrowed it down to this block of code. Thoughts?
I can't look at the plugin at the moment. That looks like code in the edition handling and it getting the ISBN. You would need to replicate that, except for the last line, to get the ASIN as well.

But, there will be other changes needed. The "goodreads_edition_book" is being initialised somewhere, when it is selected it is copied to another object for the book and later the book in the library is updated. Finding all the instances of "isbn" in the plugin and replicating that will probably get you close.

And unfortunately, this sort of thing should be a configurable option. Some people will want to get the ASIN this way, some won't.

Overall, I can see the desire for this. I don't tend to use the ASIN much myself, so haven't felt the loss. If you want to do it and give me the changes, I'll be happy to add it to the plugin. Otherwise, I might do it when I get bored.
davidfor is offline   Reply With Quote
Old 08-08-2018, 02:45 AM   #1144
Iceybones
Junior Member
Iceybones began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: Kindle PW3
Thanks for the reply davidfor. I'm not all that familiar with Python or XPath. I know C# so I can infer quite a bit about the code but I have no business writing anything for the end user. Was just hoping to sloppily tweak it to fit my own needs. I'll keep messing with it and hopefully I either stumble onto something or you get bored and bail me out.
Iceybones is offline   Reply With Quote
Old 08-08-2018, 04:17 AM   #1145
Iceybones
Junior Member
Iceybones began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: Kindle PW3
davidfor: So I switched over to tweaking the goodreads metadata source plugin because it is much simpler. I got it covered I'll post the code in the other thread.

Last edited by Iceybones; 08-08-2018 at 05:28 AM.
Iceybones is offline   Reply With Quote
Old 08-10-2018, 01:41 AM   #1146
Alissa1651
Enthusiast
Alissa1651 began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Aug 2014
Device: Kindle app for iOS
Oh, thank you both! Most of my books are linked to an ASIN too, so this feature would be nice!
Alissa1651 is offline   Reply With Quote
Old 08-10-2018, 02:58 AM   #1147
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 15,090
Karma: 24708566
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE, Clara HD
Quote:
Originally Posted by Alissa1651 View Post
Oh, thank you both! Most of my books are linked to an ASIN too, so this feature would be nice!
If you already have an ASIN, this suggestion for a change won't help. This is to let the plugin set the ASIN when changing the edition. I'm not sure if I will do this here. But, a similar change has been offered in the Goodreads Metadata source plugin, and I will probably adopt that.
davidfor is offline   Reply With Quote
Old 08-11-2018, 07:20 PM   #1148
Rellwood
Library Breeder
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 351
Karma: 1891742
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (2), PW2 (1), PW3 (4)
@davidfor

I was hoping that this would resolve itself. Do you remember a couple of years ago this had happened? It is associated with shelves containing more that 100 books. It hasn't resolved and I am now doing a bug report. Just letting you know.
Rellwood is offline   Reply With Quote
Old 08-11-2018, 08:55 PM   #1149
Rellwood
Library Breeder
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 351
Karma: 1891742
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (2), PW2 (1), PW3 (4)
[QUOTE=davidfor;3732149]@Rellwood: I have done some testing here, and I cannot reproduce this. I have tried several shelves bigger 60 books, including one with 491 books.

I'm hoping this is a transient network or server problem. If it persists, can you run calibre in debug mode, do the sync for a shelf and post the log. The log might give a clue as to whether there is something I can do.[/QUOTE

I initially thought that it had to do with having too many sync commands with the "read" shelf. However, it seems that books that have no commands other than to add to the "current shelf" column still stalls out. I have two users on my computer (both me) so I have Calibre running on both. The version that is less used, less updated is able to update the shelves. The up-to-date user is having problems. I created a debug log using both. I don't want to attach them here. I will PM you.
Rellwood is offline   Reply With Quote
Old 08-11-2018, 10:21 PM   #1150
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 15,090
Karma: 24708566
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE, Clara HD
Quote:
Originally Posted by Rellwood View Post
I initially thought that it had to do with having too many sync commands with the "read" shelf. However, it seems that books that have no commands other than to add to the "current shelf" column still stalls out. I have two users on my computer (both me) so I have Calibre running on both. The version that is less used, less updated is able to update the shelves. The up-to-date user is having problems. I created a debug log using both. I don't want to attach them here. I will PM you.
It isn't the sync commands. The previous error showed it was during the download from Goodreads. The timeout is a network or server problem. I'm not expecting more than confirmation of this from the logs.
davidfor is offline   Reply With Quote
Old 08-14-2018, 03:35 PM   #1151
Rellwood
Library Breeder
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 351
Karma: 1891742
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (2), PW2 (1), PW3 (4)
Quote:
Originally Posted by davidfor View Post
It isn't the sync commands. The previous error showed it was during the download from Goodreads. The timeout is a network or server problem. I'm not expecting more than confirmation of this from the logs.
Yeah, I never really figured out what it was, so I just imported another library that was working. Now I have to redo all the shelf commands.

Thanks for your help though!
Rellwood is offline   Reply With Quote
Old 08-16-2018, 07:51 AM   #1152
Inezg
Junior Member
Inezg began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2018
Device: kobo
Error on plugin start

Hi, I installed the plugin today (on calibre floating on my external USB drive) and I get an error as soon as I try to customize (open?) the plugin. It keeps asking me to restart calibre. I have done this many times, tried reinstalling/restarting, installed it using zip, installed it using calibre plugin manager. I checked it out in debug mode, and I get this error:

ImportError: No module named pin_columns

That is the only thing relating goodreads_sync that's in there, I checked by running in debug mode without the plugin.

I have no clue what is wrong or what I should do to fix it. I really want to use this plugin!

Inez
Inezg is offline   Reply With Quote
Old 08-16-2018, 08:28 AM   #1153
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 15,090
Karma: 24708566
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE, Clara HD
Quote:
Originally Posted by Inezg View Post
Hi, I installed the plugin today (on calibre floating on my external USB drive) and I get an error as soon as I try to customize (open?) the plugin. It keeps asking me to restart calibre. I have done this many times, tried reinstalling/restarting, installed it using zip, installed it using calibre plugin manager. I checked it out in debug mode, and I get this error:

ImportError: No module named pin_columns

That is the only thing relating goodreads_sync that's in there, I checked by running in debug mode without the plugin.

I have no clue what is wrong or what I should do to fix it. I really want to use this plugin!
That's an error I made in the last release. I've actually been surprised that no one had noticed it before. But, it means that you are using an older version of calibre. If possible, I would recommend updating calibre.

In case you cannot update calibre, the attached version of the plugin should fix the problem.
Attached Files
File Type: zip Goodreads Sync.zip (218.0 KB, 22 views)
davidfor is offline   Reply With Quote
Old 08-16-2018, 10:52 AM   #1154
Inezg
Junior Member
Inezg began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2018
Device: kobo
Quote:
Originally Posted by davidfor View Post
That's an error I made in the last release. I've actually been surprised that no one had noticed it before. But, it means that you are using an older version of calibre. If possible, I would recommend updating calibre.

In case you cannot update calibre, the attached version of the plugin should fix the problem.
Thanks! That worked! And superthanks for the fast reply!
I'll probably update sometime soon but at work I don't have administrator rights
Inezg is offline   Reply With Quote
Old 08-26-2018, 12:46 PM   #1155
Georgie W
Member
Georgie W began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jan 2014
Device: Kindle Touch 5.3.7
Hi, Couple of things. Firstly, thanks for the plug-in and the work you do on it - really appreciated. Recently, though, I think I'm coming across a bug when I add a book to GR from Calibre, and attempt to set the rating through the GR sync window. I used to be able to give it a star rating, but now I get an error message -
AttributeError "DoAddRemoveTableWidget" object has no attribure 'pin_view'.
CLicking OK to this brings up the rating box (though lined up under the "Status" column) and I'm able to complete the rating then. So it's not a major problem, but a minor bug.

The other thing is that when I sync my reviews from GR (where I write them) to Calibre, only the first x lines are sync'd - the rest are cut off. Is there any way of over-riding the limitation?

Thanks.
Georgie W is offline   Reply With Quote
Reply

Tags
calibre, goodreads

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Open With kiwidude Plugins 332 08-31-2018 08:54 AM
[GUI Plugin] Search the Internet kiwidude Plugins 294 07-11-2018 06:47 PM
[GUI Plugin] Quick Preferences kiwidude Plugins 33 06-20-2018 03:00 AM
[GUI Plugin] Clipboard Search kiwidude Plugins 9 08-12-2014 03:36 AM
[GUI Plugin] Book Sync **Deprecated** kiwidude Plugins 111 06-07-2011 07:47 PM


All times are GMT -4. The time now is 04:50 PM.


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