View Single Post
Old 03-08-2013, 06:23 PM   #20
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,987
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Kovid,

I've been playing with this and with a bit of work I'm able to get my existing CLI interfaces to run using 'calibre-debug --run-plugin'. That's pretty cool.

However, while figuring out how to get at the config preferences my PI has stored in db.prefs.get/set_namespaced, I realized that calibre-debug doesn't have the '--with-library' option that calibredb does. I can relatively easily get the db for the library last used in the gui, but not a specified one.

If CLI plugins are meant to be able to access/update library db's, might it be better to make run_plugin a command under calibredb and pass the db in to cli_main?

I finally made myself a working src dir for calibre, so I can do the coding for this approach and submit it for your review, if you like.
JimmXinu is offline   Reply With Quote