|08-27-2009, 02:06 PM||#1|
Join Date: Aug 2009
Developing a plugin on osx 10.5
I would like to create a calibre plugin that automatically locates the ISBN from each book in my library and pulls the book metadata from the internet: title, author, publisher, date.
I have looked at the plug-in documentation, and I have a basic understanding of python. However, I'm unsure how to reference the calibre python module from within the application bundle.
Does anyone have an example of how to do this?
|08-27-2009, 02:55 PM||#2|
Creator of calibre
Join Date: Oct 2006
Location: Mumbai, India
You wont be able to create a plugin to automatically fetch the metadata. But you can just create a new metadata reader plugin for your files that extracts the ISBN. That way you can just click a button and calibre will download all metadata based on the extracted plugin.
As for your question: Look in the calibre sources (in the builtins module) to see how metadata reader plugins are created. Create yours in exactly the same way and add it to calibre with a high priority so it overrides the built-in one.
Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it.
|08-28-2009, 03:54 PM||#3|
Join Date: Jan 2008
Device: Palm Treo 680, Sony Reader
If I understand correctly, you want to update the Meta-Data for all of the books that are already in your library, correct?
Looks like you'll want to use Calibre's command-line tools and create a standalone script.
Let's see, to get a list of your books (you'll need the database IDs for each one):
Then you need to get the current metadata so that you can get the ISBN number:
calibredb show_metadata [options] id
Then you'll want to use that ISBN to search for Metadata:
fetch-ebook-metadata --isbn ########
And then you take that new data and apply it to each eBook in the database by id:
calibredb set_metadata id /path/to/metadata.opf
Anyhow, I leave the details to you on how you want to script it. You could do it in Applescript if you want. Let us know how far you get!
|bundle, module, osx, python|
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|New Plugin Type Idea: Library Plugin||cgranade||Plugins||3||09-15-2010 12:11 PM|
|Developing for the iPad?||phmadore||General Discussions||7||04-09-2010 05:48 PM|
|Difference between emulator and real device (developing uds plugin for djvu)||luite||iRex||7||03-03-2010 08:55 PM|
|I need help for developing||Smellyday||Kindle Developer's Corner||1||11-28-2009 11:12 AM|
|iLiad Developing Apps||Open Window||iRex Developer's Corner||10||02-13-2007 11:49 AM|