Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-21-2022, 07:56 AM   #1
tn4w
Enthusiast
tn4w began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Aug 2022
Device: Windows 10
Command to find the path of metadata.db

Hello,

I'm wondering what would be a good way to get the path of metadata.db of a current library using a command line.

What I do now is:

1. Run
Code:
calibredb list --limit 1 --search formats:true --fields formats --for-machine
2. Pick a file path from the result and climb to a directory that metadata.db exists and return the path

Is there a better way?

The reason I need the path of the database file is to use an external SQL database program to analyze data (not editing anything in the database) such as to know how many items are added in the past n hours and whether a specific book exists in the database etc. as Calibre commands often returns BusyError: database is locked and slow responding.
tn4w is offline   Reply With Quote
Old 11-21-2022, 09:48 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: 45,318
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre-debug -c "from calibre.library import db; print(db().library_path)"
kovidgoyal is offline   Reply With Quote
Advert
Old 11-21-2022, 10:20 AM   #3
tn4w
Enthusiast
tn4w began at the beginning.
 
Posts: 34
Karma: 10
Join Date: Aug 2022
Device: Windows 10
Thank you!
tn4w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to see / find path and file used to import? Quoth Calibre 17 02-13-2020 06:17 PM
unable to find path at transferring book Leonatus Devices 1 01-05-2020 06:40 AM
Conversion Error [3, 'The system cannot find the path specified.'] Redvis Conversion 5 12-27-2019 01:44 PM
How can I find out where the font path of Iriver Cover Story mrfirm iRiver Story 3 07-22-2013 12:40 PM
Specify liberary path in command line when launching calibre rollercoaster Calibre 2 03-04-2010 12:08 AM


All times are GMT -4. The time now is 07:34 AM.


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