Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2019, 05:28 PM   #1
olerite
Junior Member
olerite began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2017
Device: Kobo Glo
Calibre x Apple iBooks/Books interfacing / plugin

Hey Guys,

First of all I am sorry if that is a repeated issue, I have searched in the forum on the subject but did not find any related thread.

I am writing some python code to interface with apple's proprietary MacOS iBooks/Books applications (by editing the sqlite and plist databases), that replaces iTunes to manage ebooks.

So far I am able to add new ebooks, collections and series and update their metadata information as well. I already know how to delete and list from the catalog -- soon to be implemented as well.

A foreseeable goal would be to package it as a calibre plugin and give users back the ability to sync Calibre with ios devices through Apple iBooks/Books.

Does that make sense? What would be the best approach? I have started reading the docs on plugin development and calibre API, I am still trying to figure it out.

best regards
olerite is offline   Reply With Quote
Old 12-11-2019, 01:51 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 36,084
Karma: 15014853
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You would create a GUI plugin, when the user clicks on it it would need to call

self.gui.device_manager.mount_device(kls=IBooksDri ver)

where IbooksDriver is a class that implements the driver. The interface such a class must implement is in devices/interface.py simply inherit from that class and implement the various methods.
kovidgoyal is offline   Reply With Quote
Old 12-13-2019, 11:54 AM   #3
moonman272
Junior Member
moonman272 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2011
Device: Hanlin V3 Clone (BeBook)
I'd be in

If you make that i'd be alllll over it
moonman272 is offline   Reply With Quote
Old 12-20-2019, 05:53 PM   #4
olerite
Junior Member
olerite began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2017
Device: Kobo Glo
Working on it, I hope to call for alpha testers a couple of weeks after the holidays.
olerite is offline   Reply With Quote
Old 12-20-2019, 06:04 PM   #5
olerite
Junior Member
olerite began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2017
Device: Kobo Glo
Quick question on adding icons to the menubar

Quote:
Originally Posted by kovidgoyal View Post
You would create a GUI plugin, when the user clicks on it it would need to call

self.gui.device_manager.mount_device(kls=IBooksDri ver)

where IbooksDriver is a class that implements the driver. The interface such a class must implement is in devices/interface.py simply inherit from that class and implement the various methods.
I am taking a look at the Fusion Books as an exemple, and it seems that they made it even simpler, without actually inherit from the interface.py class.

Anyway, I do still have some doubt on the GUI integration. Is if there is a way to automatically add the plugin icon to the menubar or its context menu option?

The ones I created using action_spec and create_action() are available to be added if I go to the customization preferences pane, but I am wondering if they can be added by any method of the GUI object, sparing the user of this effort.
olerite is offline   Reply With Quote
Old 12-20-2019, 06:33 PM   #6
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 15,456
Karma: 16370000
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Most (all ???) GUI plugins give the user the choice of defining the toolbars and menus where the tool is to be shown - it's a multiple choice list, viz:

Click image for larger version

Name:	Annotation 2019-12-21 092331.jpg
Views:	37
Size:	137.4 KB
ID:	175768

Added: you might only get that when a plugin is first installed, not when updating an existing plugin.

BR

Last edited by BetterRed; 12-20-2019 at 07:46 PM.
BetterRed is offline   Reply With Quote
Old 01-06-2020, 09:56 AM   #7
olerite
Junior Member
olerite began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2017
Device: Kobo Glo
Quote:
Originally Posted by BetterRed View Post
Most (all ???) GUI plugins give the user the choice of defining the toolbars and menus where the tool is to be shown - it's a multiple choice list, viz:

Attachment 175768

Added: you might only get that when a plugin is first installed, not when updating an existing plugin.

BR
Hmmm, i am still on the development environment, where the plugin is installed using the command line, perhaps that is why it did not showed the option to add it to the interface... I will look into it again latter, when the plugin should be nearly ready for packaging and end-user tests.

Thanks for the input.
olerite is offline   Reply With Quote
Old 01-06-2020, 05:32 PM   #8
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 15,456
Karma: 16370000
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by olerite View Post
Hmmm, i am still on the development environment, where the plugin is installed using the command line, perhaps that is why it did not showed the option to add it to the interface...
<snip>


That's probably it, a brain cell is telling me that the "Add xxx to toolbars and menus" dialogue also doesn't pop when you add a plugin from a file.

BR
BetterRed is offline   Reply With Quote
Reply

Tags
apple, ibooks, ios, macos, plugin development

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ibooks drm removal calibre plugin JGageSATX Plugins 0 07-25-2018 06:12 PM
Uploading books from ibooks to Calibre lisaransom Calibre 2 12-12-2012 04:29 PM
Apple's iBooks 2, iBooks Author: Bids to own publishing's future wannabee News 0 01-19-2012 08:33 PM
Problem Interfacing Calibre with Lenovo IdeaPad datavet Devices 4 01-12-2012 03:09 PM
calibre Content Server Interfacing API alexyeo Development 2 11-01-2011 12:18 AM


All times are GMT -4. The time now is 04:00 AM.


MobileRead.com is a privately owned, operated and funded community.