View Single Post
Old 11-19-2008, 11:30 AM   #6
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,943
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'd recommend against direct access to metadata.db. Its structure is not stable and generally speaking you dont want to have concurrent access to the db.

server.py already contains code to search and sort by various fields (it used for the HTMl content server), so you can just leverage that existing code if you modify server.py (have a look at the function library which generates the XML catalog of books for the content server to see sort and search in action). You'd have to modify the function stanza to handle multiple catalogs.

If you want to develop in perl, I'd suggest parsing the XML output of calibredb. It's very simple, so it shouldn't be a problem.
kovidgoyal is online now   Reply With Quote