View Single Post
Old 12-19-2015, 01:35 PM   #117
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,699
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by rubeus View Post
Hi,

i can put a cover.xhtml template file in the sigil prefernce folder which is in windows

C:\Users\rubeus\AppData\Local\sigil-ebook\sigil\cover.xhtml

This template is used when i select the Add Cover menu item.

How can i read this file independet from the os to use it i my own plugin?

//rubeus
I believe bk._w.usrsupdir should get you the Sigil preferences directory in a cross-platform-safe way.

Some other cross-platform Wrapper properties that may come in handy are:
bk._w.appdir (the path to the directory the Sigil executable is in)
bk._w.selected (a python list of the files selected in Sigil's Book Browser)

Those should be available from Sigil 0.8.90x onward (I think).

Last edited by DiapDealer; 12-19-2015 at 01:41 PM.
DiapDealer is offline   Reply With Quote