Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-27-2016, 07:11 PM   #16
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
That is a python 3 error message when a bytes object is added to a string object. My guess is that the prefs are being read in as bytes for some reason and can't be directly concatenated without a call to decode. But this is only a wild guess.
KevinH is online now   Reply With Quote
Old 06-27-2016, 07:15 PM   #17
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Auramazda View Post
Hi, I tried the plug-in on a css with too many stile but I get a error message
I got the same message in an earlier version. Uninstall the plugin, download and install the latest version and re-run the plugin.

If you're still getting the error message, please post the stylesheet that caused the error message.
Doitsu is offline   Reply With Quote
Advert
Old 06-27-2016, 08:30 PM   #18
Auramazda
Member
Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.Auramazda is no ebook tyro.
 
Posts: 16
Karma: 1422
Join Date: Mar 2016
Device: none
Is the last version, I downloaded it tonight, I deleted and reinstalled it but I got the same message.
The CSS is:
https://www.dropbox.com/s/d2n6iv1815...stili.css?dl=0

PS thanks for the fast reply
Auramazda is offline   Reply With Quote
Old 06-27-2016, 10:33 PM   #19
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,630
Karma: 5433388
Join Date: Nov 2009
Device: many
Is the b byte indicator needed here? See plugin.py
Code:
def get_css_output_prefs(bk):
    prefs = bk.getPrefs()
    prefs.defaults['indent'] = "\t" #2 * ' '
    prefs.defaults['indentClosingBrace'] = False
    prefs.defaults['keepEmptyRules'] = True
    prefs.defaults['omitLastSemicolon'] = False
    prefs.defaults['omitLeadingZero'] = False
    prefs.defaults['blankLinesAfterRules'] = 1 * b'\n'
    prefs.defaults['formatUnknownRules'] = False
    return prefs
KevinH is online now   Reply With Quote
Old 06-28-2016, 01:59 AM   #20
wrCisco
Enthusiast
wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
Yes, that 'b' is the problem. Already fixed on github but I didn't find the time to upload a new release yet (I'll do it this evening).

In the meanwhile, in order to bypass the problem, you can just open the preferences dialog and click on "save and continue" (incorrect string type is only on default values, and the plugin uses them only when no preferences file exists).
wrCisco is offline   Reply With Quote
Advert
Old 06-28-2016, 03:23 PM   #21
wrCisco
Enthusiast
wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
Just uploaded version 0.2.2 with the fix.
wrCisco is offline   Reply With Quote
Old 10-30-2016, 12:27 PM   #22
wrCisco
Enthusiast
wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
Just uploaded v0.2.3 of the plugin to guarantee compatibility with Sigil v0.9.7, that changes reading mode of stylesheet files.
wrCisco is offline   Reply With Quote
Old 10-30-2016, 12:48 PM   #23
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: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by wrCisco View Post
Just uploaded v0.2.3 of the plugin to guarantee compatibility with Sigil v0.9.7, that changes reading mode of stylesheet files.
For what it's worth, the .decode() bit was never working correctly on Linux even before Sigil v0.9.7. I had to remove .decode() from two places to get cssRemoveUnusedSelectors v0.2.2 to work with Sigil 0.9.6 on Linux (similar to your 0.2.3 modification). I never got around to mentioning that. Sorry. I can verify that v0.2.3 does work "out of the box" on Sigil v0.9.7 on Linux, though. Thanks.

Last edited by DiapDealer; 10-30-2016 at 12:50 PM.
DiapDealer is offline   Reply With Quote
Old 10-30-2016, 02:11 PM   #24
wrCisco
Enthusiast
wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
Strange. To me it always worked correctly on Ubuntu. Anyway, glad that the new version is OK, thanks for testing.
wrCisco is offline   Reply With Quote
Old 12-05-2016, 09:47 AM   #25
wrCisco
Enthusiast
wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
Uploaded the version 0.3.0 of the plugin, which can parse xml files in epub (not only xhtml), has a more robust handling of css namespaces and is licensed as free software (GPLv3).
wrCisco is offline   Reply With Quote
Old 05-19-2018, 04:50 PM   #26
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Hi, the plugin gave an error notice to the following css styles:

Code:
color:RGB(0,124,196)
I'm pretty sure that is valid css??
Code:
.HC      {color:RGB(239,50,36); font-size:1.1em; line-height:1.5}
.HC em   {color:RGB(136,137,140)}
.HC span {color:RGB(0,124,196)} 
.HC img  {max-width:20px; max-height:23px}
When I removed the 3 lines with color:xxxx it worked fine.
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	377
Size:	19.0 KB
ID:	164044  

Last edited by Turtle91; 05-19-2018 at 04:54 PM.
Turtle91 is offline   Reply With Quote
Old 05-19-2018, 06:27 PM   #27
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Turtle91 View Post
Code:
color:RGB(0,124,196)
The parser that the plugin uses expects lower case rgb() declarations. Try changing RGB() to rgb().
Doitsu is offline   Reply With Quote
Old 05-19-2018, 07:40 PM   #28
wrCisco
Enthusiast
wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.
 
Posts: 34
Karma: 467802
Join Date: Apr 2016
Device: none
Yes, that seems to be a bug in cssutils that does a case sensitive match with 'rgb(', 'rgba(' and relatives, while it should be ASCII case insensitive.
I'll file a bug report to cssutils.

In the meantime the workaround is, as suggested by Doitsu, to use only lowercase characters for color functions.

(I think that the patch in cssutils should be something like this...
In cssutils/css/value.py, in method _setCssText of class ColorValue:
Code:
noalp = Sequence(Prod(name='FUNCTION',
                      match=lambda t, v: t == types.FUNCTION and
                                              v in ('rgb(', 'hsl('),
...
witha = Sequence(Prod(name='FUNCTION',
                      match=lambda t, v: t == types.FUNCTION and
                                              v in ('rgba(', 'hsla('),
should become:
Code:
noalp = Sequence(Prod(name='FUNCTION',
                      match=lambda t, v: t == types.FUNCTION and
                                              v.lower() in ('rgb(', 'hsl('),
...
witha = Sequence(Prod(name='FUNCTION',
                      match=lambda t, v: t == types.FUNCTION and
                                              v.lower() in ('rgba(', 'hsla('),
).

Thanks for the bug report!
wrCisco is offline   Reply With Quote
Old 05-19-2018, 08:48 PM   #29
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
That did the trick! Thanks!!
Turtle91 is offline   Reply With Quote
Old 05-22-2018, 01:07 AM   #30
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,301
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Turtle91 View Post
That did the trick! Thanks!!
Sounds much like what one instructor told a class I was in, "The CSS specification says 'All CSS style sheets are case-insensitive' and goes on to say 'element names are case-insensitive in HTML, but case-sensitive in XML' so don't use anything but lowercase unless absolutely needed since I will guarantee that it will bite you in the butt."

Admittedly, his favourite t-shirt read "Murphy was a raving optimist".
DNSB is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 01:25 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 AM
Plugin not customizable: Plugin: HTML Output does not need customization flyingfoxlee Conversion 2 02-24-2012 02:24 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM
New Plugin Type Idea: Library Plugin cgranade Plugins 3 09-15-2010 12:11 PM


All times are GMT -4. The time now is 10:14 PM.


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