View Single Post
Old 02-04-2010, 11:55 AM   #8
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: 45,374
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre provides a full programmatic interface to the database via the calibre-debug command

Code:
calibre-debug -c "from calibrelibrary.database2 import LibraryDatabase2; db = LibraryDatabase2('/path/to/library/folder'); db.execute('some sql statement');"
You can also use

calibre-debug -e path_to_script.py

to execute long scripts
kovidgoyal is online now   Reply With Quote