View Single Post
Old 10-14-2017, 02:00 AM   #1
botmtl
Enthusiast
botmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel isbotmtl really knows where his or her towel is
 
botmtl's Avatar
 
Posts: 43
Karma: 70238
Join Date: Jun 2014
Device: none
Metadata knowing bookID (outside the ui)

I have found in good examples of getting a calibre.ebook.Metadata object given a bookId but so far I have only seen it in InterfaceAction plugins (they get everything they need to get to the gui.db in __init__).

I'm trying to run do the same thing (get Metadata knowing a bookid) but from a Source plugin running in cli mode (calibre-debug -r "mypluginname").

I saw that there is a show_metadata method in calibredb and that seemed promising because it's the same no-ui context but I got lost trying to find where the contextdb that command uses to access the database is created.

Could anyone point me to an example that would show how to get to the book metadata knowing the bookid when the context is a "no ui" loaded context?
botmtl is offline   Reply With Quote