05-03-2012, 09:32 AM | #1 |
Member
Posts: 10
Karma: 10
Join Date: Nov 2010
Device: kindle
|
Folder "device" plugin - suggestions?
Hi, was wondering if somebody who knows their way around Calibre could give me some hints. I've looked at some of the documentation, but Calibre is quite a large project so it's hard to say exactly how things will work without quite a bit of study.
What I'm aiming for is pretty simple: Have a folder interpreted as a device, much like the built-in "connect to folder" functionality except there will be a metadata file in the directory that I'll have to update when a book is added or deleted. I'd like calibre to detect the directory itself, but ulitmately if the user has to "connect to folder" and calibre just recognises the metadata file itself then that'd be fine. Thoughts? I've been looking at the DevicePlugin class but it seems to be heavily geared towards USB. Really I'm just looking for somebody to list ideas or places to me so that I can investigate them. Thanks. |
05-03-2012, 10:03 AM | #2 |
creator of calibre
Posts: 43,771
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Simply modify the folder device plugin and re-implement the appropriate methods (look in devices.interface for the list of methods)
|
Advert | |
|
05-03-2012, 10:13 AM | #3 |
Member
Posts: 10
Karma: 10
Join Date: Nov 2010
Device: kindle
|
Thanks Kovid, I'll check it out.
|
05-03-2012, 11:21 AM | #4 |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
How does the content of the metadata file you wish to update differ from the existing .metadata.calibre file? That file contains calibre metadata for books in the folder, and is maintained by the existing driver.
If it is a difference in format, then wouldn't a converter be easier to write? Edit: If you really want to maintain a second metadata file, then you would add an override of sync_booklists. Write your metadata file, then call the method in the superclass (USBMS). Last edited by chaley; 05-03-2012 at 11:26 AM. |
05-03-2012, 12:20 PM | #5 | ||
Member
Posts: 10
Karma: 10
Join Date: Nov 2010
Device: kindle
|
Quote:
Quote:
I do appreciate the answers. I think I have enough to get me going. |
||
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SONY pocket edition: "Device locked" + "charge battery" obstacles? | hermes | Devices | 3 | 06-02-2011 03:32 AM |
No data in "In Library" and "On Device" columns after upgrade | ily426 | Library Management | 8 | 04-03-2011 02:53 PM |
Run plugin after "send to device" | minicheck | Development | 1 | 02-26-2011 09:42 PM |
automatically mount "folder device" | perler | Calibre | 0 | 07-20-2010 04:28 PM |