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 10-05-2012, 05:44 AM   #1
Pepin33
Zealot
Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.
 
Posts: 109
Karma: 419
Join Date: Aug 2012
Location: Spain
Device: Kindle Touch
Saving my own data in Calibre's database

I'm working in a plugin to log the changes I made on a library (add books or formats, delete books or formats, etc) to be able to replicates it again.

I need to save a list of the changes on every book. And I was looking at Calibre's database to find if there is a table to do this.

I found the "books_plugin_data" table, with this fields: id, book, name and val. Can I use this table to store my values, or is it intended to store another thing?

If it's unsuitable to use Calibre's tables to store data from plugins, what's the correct way to do this? (maybe a JSON file?)
Pepin33 is offline   Reply With Quote
Old 10-05-2012, 06:20 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: 25,668
Karma: 4998489
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
books_plugin_data is meant to be used by 3rd party plugins. Feel free to use it. Just make sure you prefix the values you put into the name column with something fairly unique so that it does not conflict with other plugins.
kovidgoyal is online now   Reply With Quote
 
Enthusiast
Old 10-05-2012, 06:33 AM   #3
Pepin33
Zealot
Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.
 
Posts: 109
Karma: 419
Join Date: Aug 2012
Location: Spain
Device: Kindle Touch
Thank you very much for the help, kovidgoyal. I'll follow your advices.
Pepin33 is offline   Reply With Quote
Old 10-05-2012, 10:57 AM   #4
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: 25,668
Karma: 4998489
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And just in case you aren;t aware of it there is API in database2.py to use that table, which you should use. add_custom_book_data()/get_custom_book_data()
kovidgoyal is online now   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
Saving book data to give to someone else GaryO Calibre 2 02-09-2012 07:37 PM
Calibre Database cp Kindle Database mitch13 Library Management 1 05-22-2011 07:33 PM
Saving Meta-data to Books without conversion Theeo123 Calibre 14 12-09-2010 07:42 PM
Problem when saving to disk (database locked) gargoyle Calibre 1 12-05-2010 08:00 PM
SmartQ5 - modem init string and login data saving Drakon Rider Alternative Devices 4 09-27-2009 05:09 AM


All times are GMT -4. The time now is 09:31 AM.


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