Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2019, 04: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, 12: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: 43,858
Karma: 22666666
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 online now   Reply With Quote
Old 12-13-2019, 10: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, 04: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, 05: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, 05:33 PM   #6
BetterRed
null operator (he/him)
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: 20,568
Karma: 26954694
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:	598
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 06:46 PM.
BetterRed is offline   Reply With Quote
Old 01-06-2020, 08: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, 04:32 PM   #8
BetterRed
null operator (he/him)
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: 20,568
Karma: 26954694
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
Old 06-23-2020, 08:55 AM   #9
nonlinear.nyc
Junior Member
nonlinear.nyc began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2020
Device: iPad
That's a great idea, coz we get best of both worlds.

By interfacing with books app, does it mean book app highlights and notes are then synced back to calibre? Because that's my major issue with my (manual) integration.

I recall the content of previously read book by my highlights, so they're very important to me.
nonlinear.nyc is offline   Reply With Quote
Reply

Tags
apple, ibooks, ios, macos, plugin development


Forum Jump

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


All times are GMT -4. The time now is 03:33 AM.


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