View Single Post
Old 07-06-2021, 06:44 PM   #32
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,762
Karma: 206758686
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by lxs602 View Post
Hi,

I am trying to use the PrincePDF plugin on Sigil 1.6.0 on Linux.

I added
Code:
 "style": true,
to /home/user/.local/share/sigil-book/sigil/plugins_prefs/PrincePDF/PrincePDF.json to enable a custom stylesheet, style.css.

I put a custom style.css in the following directories, but the plugin does not find it (The epub file is in /home/user):



I get the error:
Code:
prince: Applying style sheets...
prince: loading style sheet: ../style.css
prince: ../style.css: warning: can't open input file: No such file or directory

The below is just a guess as I cannot code (it did not work), but I also tried temporarily changing the line in plugin.py , from:
Code:
stylesheet_path = os.path.join(bk._w.plugin_dir, bk._w.plugin_name, 'style.css')
to:
Code:
stylesheet_path = os.path.join('/home/user', 'style.css')
Where should I put the styles.css file?

Thanks,

L
The 'style.css' file goes in the plugin folder. The second one in the list of folders you tried.

Code:
/home/user/.local/share/sigil-book/sigil/plugins/PrincePDF
Obviously "user" needs to be changed to your actual user name. It works as described for me. But I'm worried about your output:

Code:
prince: loading style sheet: ../style.css
Is that the actual output you're seeing? Because when I run the plugin, it shows the entire path to the style.css file:

Code:
prince: loading style sheet: /home/<USER>/.local/share/sigil-ebook/sigil/plugins/PrincePDF/style.css
DiapDealer is offline   Reply With Quote