Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-06-2022, 09:43 PM   #1
calibrejunkie
Page Junkie Dev
calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.
 
calibrejunkie's Avatar
 
Posts: 37
Karma: 6280
Join Date: Jul 2018
Location: Earth
Device: Android Phone, Kindle, Surface Pro 3
Question Where does calibre store the library paths for the currently loaded library?

Hello,

Could someone please tell me how to get the currently selected/loaded Library path from calibre from inside a plugin using python?

For example, if the currently loaded library is at "c:\myLibraryPath", how do I get that information?

I assume there must be an API call for it, but I am not having any luck finding it in the API documentation.

I did see a call for getting a book's path, format_abspath(book_id, fmt), so I guess I could pull a random book and cut off the book part of the path? But seems like there would probably be a direct reference to the current library path?

Thank you for your time!
calibrejunkie is offline   Reply With Quote
Old 06-06-2022, 10:22 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: 43,935
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
from calibre.utils.config_base import prefs
prefs['library_path']
kovidgoyal is offline   Reply With Quote
Advert
Old 06-07-2022, 01:13 PM   #3
calibrejunkie
Page Junkie Dev
calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.calibrejunkie got an A in P-Chem.
 
calibrejunkie's Avatar
 
Posts: 37
Karma: 6280
Join Date: Jul 2018
Location: Earth
Device: Android Phone, Kindle, Surface Pro 3
Quote:
Originally Posted by kovidgoyal View Post
from calibre.utils.config_base import prefs
prefs['library_path']
Thank you very much!
calibrejunkie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone store their library elsewhere, and only use Calibre to edit ebooks? TortoiseAvenger Library Management 3 01-03-2020 10:04 AM
Calibre 2.36 Library Switch dropdown menu gsparks2 Calibre 2 09-02-2015 11:54 AM
Is it ok to store my Calibre library in Google docs? Waylander General Discussions 23 12-31-2013 05:44 AM
Can library menu dropdown be sized? David Bowen Calibre 10 01-21-2011 11:36 AM
epub-library: relative paths josepinto EPUBReader 2 12-03-2009 06:40 AM


All times are GMT -4. The time now is 03:23 PM.


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