OK the Title Goal ("Scrape and Update a Custom field PLugin") is probably way too generic. But I have not let go the idea of having a custom DCC column in my Calibre Library (it would be useful to me).
So a Plugin that takes the ISBN of the selected record and hits (for example)the Classify web service, and then "beautiful Soups" the result to grab the DCC, and then saves it back into the nominated custom column. would be awesome
I have been tinkering and have figured out how to use the Beautiful Soup py Module to target response XML and to Lift a certain element within the response. My difficulty comes with getting my head around how to perform an update of a custom column associated with the selected record. (ie I'm having trouble navigating the data updating code of Calibre.)
A Plugin of this kind, while initially being targeted at a specific case, could potentially be expanded to become a generic plug-in for fetching and populating custom columns of various types from various services. Some other examples might be:-
- a cost column to track how much I have spent on my ebooks.
- an IMDB movie column with a link to movies made of the book.
- a country column denoting which country the author came from.
- a notification service, which alerts you when a new book in the current book series is published.
Oh and I'm aware of the 'fragility" issue, however Classify, for instance, is more a web services than an http:html response and one could expect that the xml element names would remain constant even if their position in the response changed.