01-07-2012, 05:39 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2012
Device: Nook Color with CM7
|
Custom Device plugin for Nook Color with CM7 & Aldiko
Hi all,
I've got a Nook Color, running CyanogenMod 7, and I use Aldiko as my preferred e-Book reader. The integration with Calibre is, well, not ideal. Before I flashed CM on my Nook, I used the standard B&N software (but rooted), and I loved the way Calibre completely transparently uploaded (side-loaded?) my ebooks into the B&N Reader app. I'm considering putting some time into trying to make this seamless on my current setup as well. In order to make that happen, I need to do (as far as I can tell after just a little bit of investigation) the following:
I think I can manage (2) and (3), I inspected the structure of the Aldiko library database and it doesn't look particularly difficult. That'll help with detecting whether Aldiko is installed or not as well. I'm not sure however how to create a new Device plugin that detects this is "nook color with CM rom and aldiko". I think it's not really possible to base this based on PRODUCT_ID and BCD... Without really understanding how Calibre gets these values, based on the output of the "Debug Device Detection" and looking at the source of the NOOK_COLOR class those values appear to be the same as for a 'standard Nook Color'. Anybody can give me some pointers on how to subclass the existing NOOK_COLOR class to my specific setup, and how to make the device detection work for this? |
01-07-2012, 05:51 AM | #2 |
creator of calibre
Posts: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I suggest you create a custom plugin, disable the builtin one via Preferences->Plugins, then your custom one will always get matched against those USD ids.
|
Advert | |
|
01-07-2012, 06:09 AM | #3 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2012
Device: Nook Color with CM7
|
Quote:
Rgds |
|
01-07-2012, 06:13 AM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2012
Device: Nook Color with CM7
|
On a more general level: how can I add a device plugin to Calibre without adding it to the pylib.zip file (eg without setting up a complete development environment)? Seems to me this should be possible, but how?
|
01-07-2012, 06:47 AM | #5 |
creator of calibre
Posts: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look under the tutorials section of the user manual, there is a tutorial on how to write plugins for calibre. If other people want to use your plugin, they can do so, the same way as you would use it - disable builtin and install your plugin.
|
Advert | |
|
01-08-2012, 03:21 AM | #6 | |
Wizard
Posts: 1,759
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
Quote:
|
|
01-08-2012, 11:06 AM | #7 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2012
Device: Nook Color with CM7
|
Quote:
__init__.py (empty file) driver.py, contains: from calibre.devices import NOOK_COLOR class NOOK_COLOR_CM7 (NOOK_COLOR): name = 'Nook Device Interface with CM7' gui_name = _('The Nook Color with CM7') description = _('Communicate with Nook Color running CM7.') I'm trying to load this into Calibre with: Preferences->Advanced->Plugins->Load Plugin from File and I get: calibre, version 0.8.33 ERROR: Unhandled exception: <b>InvalidPlugin</b>:No plugin class found in C:/Maarten/Src/calibre/nook_cm7.zip:dummy1 Traceback (most recent call last): File "site-packages\calibre\gui2\preferences\plugins.py", line 292, in add_plugin File "site-packages\calibre\customize\ui.py", line 339, in add_plugin File "site-packages\calibre\customize\ui.py", line 54, in load_plugin File "site-packages\calibre\customize\zipplugin.py", line 177, in load InvalidPlugin: No plugin class found in C:/Maarten/Src/calibre/nook_cm7.zip:dummy1 So, how do I write/test a Device Driver without setting up an entire development environment for Calibre? [edit] OK, got it working. Apparently there's a naming convention for the zip file and the .py file inside. I used the Medion OYO driver plugin from here as an example, and can now load my "driver". Last edited by srv1973; 01-08-2012 at 12:44 PM. Reason: Spoke too soon |
|
01-08-2012, 11:09 AM | #8 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jan 2012
Device: Nook Color with CM7
|
Quote:
Perhaps somebody would like to cooperate? I think I can fairly easily contribute the code required to access the Aldiko library database file, and it'll go quicker if somebody could point me to the correct 'code framework' that this would need to fit in for a Calibre device driver. [edit] OK, did some tests locally with accessing the Aldiko database file, and as I thought it's pretty trivial to work with. In order to integrate this all nicely in a generic way into Calibre however is something I'm going to need a lot of pointers and help with. If there is any interested from the developers for this, please contact me. Rgds Last edited by srv1973; 01-08-2012 at 01:41 PM. |
|
01-09-2012, 03:45 AM | #9 |
creator of calibre
Posts: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Can you send me an email (my email address is all over the calibre source) and I will try to help you get going with setting up a device plugin. Once your plugin has reached maturity, and been tested by a few people, we can look into integrating it into calibre so that it is used automatically.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Nook Color with Rooted Cm7 sd card | verna2197 | Barnes & Noble NOOK | 6 | 12-16-2011 08:22 PM |
Color Nook Color - Process to move from CM7.0.3 on SD to CM7.1 in emmc? | scarab1 | Nook Developer's Corner | 4 | 11-02-2011 01:32 PM |
[Device Interface Plugin] Update for Nook Color Driver | jmricker | Plugins | 0 | 10-22-2011 10:11 AM |
Color I have CM7 on my nook color and now what??? | skydive | Nook Developer's Corner | 13 | 08-31-2011 07:01 AM |
Nook Color 1.2.0 - Want to Root Latest CM7 to SD | lennyb | Nook Developer's Corner | 3 | 08-09-2011 02:12 AM |