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 09-16-2015, 04:36 AM   #1
esvorontsov
Member
esvorontsov began at the beginning.
 
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?
esvorontsov is offline   Reply With Quote
Advert
Old 09-16-2015, 04:53 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,223
Karma: 83049275
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.
eschwartz is offline   Reply With Quote
Old 09-16-2015, 05:29 AM   #3
esvorontsov
Member
esvorontsov began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2015
Device: sdfvsdvsdvsdvsd
Quote:
Originally Posted by eschwartz View Post
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.
I want to write information to mysql database
esvorontsov is offline   Reply With Quote
Old 09-16-2015, 05:36 AM   #4
esvorontsov
Member
esvorontsov began at the beginning.
 
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
esvorontsov is offline   Reply With Quote
Old 09-16-2015, 05:42 AM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,223
Karma: 83049275
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 05:44 AM.
eschwartz is offline   Reply With Quote
Advert
Old 09-16-2015, 05:54 AM   #6
esvorontsov
Member
esvorontsov began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Sep 2015
Device: sdfvsdvsdvsdvsd
thanks
esvorontsov is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
when does calibre add/not add page_styles css cybmole Calibre 5 07-14-2014 04:58 AM
Add books problem Mac to Windows libraries richardhc Calibre 3 10-07-2011 02:48 AM
Lots of Crashes: MySQL Database! emax Calibre 1 08-25-2011 07:51 AM


All times are GMT -4. The time now is 04:12 PM.


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