|
|
#1 |
|
Zealot
![]() ![]() ![]() ![]() ![]() 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?) |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,631
Karma: 28549046
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.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Zealot
![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#4 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,631
Karma: 28549046
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()
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Saving book data to give to someone else | GaryO | Calibre | 2 | 02-09-2012 08:37 PM |
| Calibre Database cp Kindle Database | mitch13 | Library Management | 1 | 05-22-2011 08:33 PM |
| Saving Meta-data to Books without conversion | Theeo123 | Calibre | 14 | 12-09-2010 08:42 PM |
| Problem when saving to disk (database locked) | gargoyle | Calibre | 1 | 12-05-2010 09:00 PM |
| SmartQ5 - modem init string and login data saving | Drakon Rider | Alternative Devices | 4 | 09-27-2009 06:09 AM |