Originally Posted by itimpi
Thanks - that tells me where to look.
Although any individual fragment of code seems clear enough in isolation, trying to find ones way around the entirety of the Calibre source code is a bit daunting at the moment.
Feel free to ask for navigation pointers. The calibre library code is in the module calibre.library. In particular the database interface is the class LibraryDatabase2 in database2.py and the content server is in server.py
In addition the file cli.py defines the calibredb command line interface to the database