View Single Post
Old 09-24-2011, 12:03 PM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by drMerry View Post
What I'm planning to do is e.g. requesting columns from the current database and from a remote database.
So I can display them and show the differences with the option to sync (saying update data in one of the databases or add column in remote database.
That will require you to have two libraries open at the same time, or at least to switch libraries in the middle of processing. I don't see any way to do that using calibre's API without a world of hurt.

You would probably be better off writing your own query programs that produce output in some known format such as CSV. You would use python's os.system() API to execute the query on the read-only library, and calibre's API to get the info for the read/write library. Or something like that.
chaley is offline   Reply With Quote