View Single Post
Old 09-25-2008, 12:12 PM   #15
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,386
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Code:
calibre-debug -c "from calibre.library.database import LibraryDatabase; db = LibraryDatabase('library1.db'); db.refresh('title', True); import pprint; pprint.pprint(db.data)"
replace library1.db witht he full path to library1.db

This will print out all the books in the database with their id numbers. Once you have the id number for the problem book:

Code:
calibre-debug -c "from calibre.library.database import LibraryDatabase; db = LibraryDatabase('library1.db'); db.refresh('title', True); db.delete_book(id)"
kovidgoyal is offline   Reply With Quote