Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
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
Old 10-14-2017, 02:45 AM   #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: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Metadata source plugins do not have access to the db. For example, they can be run in the fetch-ebook-metadata standalone cli tool. What is your plugin actually trying to do?
kovidgoyal is offline   Reply With Quote
Advert
Old 10-15-2017, 02:03 AM   #3
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
Quote:
Originally Posted by kovidgoyal View Post
Metadata source plugins do not have access to the db. For example, they can be run in the fetch-ebook-metadata standalone cli tool. What is your plugin actually trying to do?
I wrote a really long response describing what my plugin was doing and why and I was still writing when I realized that am I working "on nothing".

I know very well that having the best cover, the best description, the best tags, the most accurate information, a link to the author's page, etc.. wont make my books gain any value or make me want to read them more... yet I spend I stupidly long amount of time on exactly doing those things. I do it almost compulsively.

Time to stop working on that project, and go read a book. Thanks for you help.
botmtl is offline   Reply With Quote
Old 11-29-2017, 01:34 AM   #4
Rellwood
Library Breeder (She/Her)
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 1,149
Karma: 1900479
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (1) PW3 (4) PW3 2019 new edition (1)
LOL! I am not the only one!
Rellwood is offline   Reply With Quote
Old 11-29-2017, 11:49 AM   #5
tomwitt
Junior Member
tomwitt has learned how to buy an e-book online
 
Posts: 5
Karma: 80
Join Date: Apr 2011
Device: nook color
Man, I could really use this kind of a plugin.

I'm trying to organize my audiobook collection and I've been using Calibre to get all the meta data details of the books then using a python script to clean up all the audio-file tags using the Calibre gleaned meta data.

I've added a few extra fields in Calibre (narrator, duration, number of files, uuid, audiobook reported date, etc) and the Import List plugin to create empty books for each audiobook directory and any meta data I can scrape from the audio file tags.

My original plan was to use the Calibre Content server then do a search on the UUID I create for each audiobook, but I have no idea how to scrape dynamic content produced by the Content Server (that's some seriously scrape resistant javascript).

For now, I'm exporting a CSV catalog file of the Calibre metadata then using that file to get the audiobook details during audio-file tagging.

Having a RESTful interface to get the specific Calibre book content given the UUID would be a nice thing to have.

Another nice plugin would be a way to programmatically add empty books into Calibre (for later Calibre clean up/look up).
tomwitt is offline   Reply With Quote
Advert
Old 11-29-2017, 11:52 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: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Both of those a possible using calibredb

And the calibre server has a JSON API that allows you to get pretty much any data nad perform pretty much any operation you like on a calibre server (this is the api that calibredb uses to conenct to calibre servers).
kovidgoyal is offline   Reply With Quote
Old 11-29-2017, 12:02 PM   #7
tomwitt
Junior Member
tomwitt has learned how to buy an e-book online
 
Posts: 5
Karma: 80
Join Date: Apr 2011
Device: nook color
I was just looking at the database API and ... there are the things I need! I wish I would've read that before posting, he says sheepishly.
tomwitt is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Knowing when you've done good gmw Writers' Corner 29 05-30-2017 01:55 AM
Getting BookId from viewer plugin Terisa de morgan Plugins 7 10-26-2016 04:54 PM
Ever kept reading despite knowing better? Katsunami General Discussions 38 06-28-2016 11:34 PM
Using the ISBN as "BookID" instead of UUID ibu Sigil 19 08-20-2013 11:29 AM
Do you start on a trilogy knowing the last book is not out! thinkpad General Discussions 92 11-26-2010 03:12 AM


All times are GMT -4. The time now is 06:57 PM.


MobileRead.com is a privately owned, operated and funded community.