View Single Post
Old 04-14-2010, 11:32 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: 45,419
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There isn't any existing work, but basically all you need to do is the following:

modify the pdf metadata reading code (in calibre.ebooks.metadata.pdf)

calibre contains a nice library for pdf reflow that converts pdf to xml use that and then search for the ISBN in the XML

Basically:

Code:
with CurrentDir(temp_dir):
     pdfreflow.reflow(stream.read())
will create index.xml in the current directory
kovidgoyal is offline   Reply With Quote