View Single Post
Old 04-03-2011, 12:05 PM   #5
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,730
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@silentguy
from calibre.utils.config import config_dir

This is the user's local Calibre directory. You will then need to add the check for the resources\images subfolders to append to that path and create if not existing. Then as Kovid says I(xxx) will work (after Calibre is restarted).

This approach is used by my Search The Internet and Open With plugins, both of which store downloaded images in that directory. The Generate Cover does something similar too.
kiwidude is offline   Reply With Quote