View Single Post
Old 02-01-2015, 07:50 PM   #2
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: 46,641
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You really should not be doing that. It is unsupported and quite likely to break in future versions, but if you really, really want to:

from calibre.gui2.ui import get_gui

db = get_gui().current_db.new_api

Of course, this will break in horrible ways if someone runs the fetch-ebook-metadata command line tool to download metadata without a GUI
kovidgoyal is offline   Reply With Quote