09-16-2015, 03:36 AM | #1 |
Member
Posts: 17
Karma: 10
Join Date: Sep 2015
Device: sdfvsdvsdvsdvsd
|
How to add mysql libraries in calibre?
Hello!
I'm developing a gui plugin that needs to write to mysql. How to add the required libraries in calibre, for example, the MySqlDb connector? |
09-16-2015, 03:53 AM | #2 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
calibre's metadata.db doesn't use a mysql database. sqlite is included in calibre, but only as a way to open and read the database.
If you want to store information in calibre's database, you can simply write your own namespaced fields to the db -- the same way calibre does. |
Advert | |
|
09-16-2015, 04:29 AM | #3 |
Member
Posts: 17
Karma: 10
Join Date: Sep 2015
Device: sdfvsdvsdvsdvsd
|
|
09-16-2015, 04:36 AM | #4 |
Member
Posts: 17
Karma: 10
Join Date: Sep 2015
Device: sdfvsdvsdvsdvsd
|
the plugin needs to read from the calibre database and writes to mysql database from which the data is displayed on the website
|
09-16-2015, 04:42 AM | #5 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Then you will have to bundle the necessary modules inside the plugin yourself.
All resources from inside the plugin zip are accessible by importing calibre_plugins.plugin_name.module_name If you need a standalone mysql client that is implemented in pure python, try: https://github.com/PyMySQL/PyMySQL Last edited by eschwartz; 09-16-2015 at 04:44 AM. |
Advert | |
|
09-16-2015, 04:54 AM | #6 |
Member
Posts: 17
Karma: 10
Join Date: Sep 2015
Device: sdfvsdvsdvsdvsd
|
thanks
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
when does calibre add/not add page_styles css | cybmole | Calibre | 5 | 07-14-2014 03:58 AM |
Add books problem Mac to Windows libraries | richardhc | Calibre | 3 | 10-07-2011 01:48 AM |
Lots of Crashes: MySQL Database! | emax | Calibre | 1 | 08-25-2011 06:51 AM |