View Single Post
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