|
|
#1 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Aug 2009
Device: none
|
Developing a plugin on osx 10.5
Hi, this is a beginner question regarding python development on osx using application bundles.
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? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
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. |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Connoisseur
![]() ![]() Posts: 91
Karma: 108
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. http://calibre.kovidgoyal.net/user_m...cli-index.html Let's see, to get a list of your books (you'll need the database IDs for each one): calibredb list 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! - Jim |
|
|
|
![]() |
| Tags |
| bundle, module, osx, python |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM |
| Developing for the iPad? | phmadore | General Discussions | 7 | 04-09-2010 06:48 PM |
| Difference between emulator and real device (developing uds plugin for djvu) | luite | iRex | 7 | 03-03-2010 09:55 PM |
| I need help for developing | Smellyday | Kindle Developer's Corner | 1 | 11-28-2009 12:12 PM |
| iLiad Developing Apps | Open Window | iRex Developer's Corner | 10 | 02-13-2007 12:49 PM |