![]() |
#76 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,030
Karma: 11123121
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
O. k. Thank you! I meant the plugin only to produce an epub by a different way. Besides, I'll try to use it on my 64 bit computer anyway.
|
![]() |
![]() |
![]() |
#77 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,598
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Given that we've had a report of an old version of Sigil that's using Tidy caused significant code loss, I would stay away from any plugin that uses Tidy.
|
![]() |
![]() |
Advert | |
|
![]() |
#78 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,981
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Tidy itself is an excellent tool and has been completely revamped for html5. But that happened after we had already chosen to go with Google's gumbo parser. So I would not compare the old Tidy used in really old versions of Sigil with Tidy that is available today.
|
![]() |
![]() |
![]() |
#79 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,598
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What version of Tidy is bundled with the plugin? Is it a new enough version?
|
![]() |
![]() |
![]() |
#80 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,799
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Don't worry about it, Jon.
|
![]() |
![]() |
Advert | |
|
![]() |
#81 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,799
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
This error is more than likely just a missing C/C++ runtime (MSVCR100.dll). Both of the tidy.dll files included in this plugin are dependent on the MS Visual C/C++ 2010 runtime. Which Microsoft stopped shipping by default with Windows 10. Yay! Many programs might install it along the way, but sometimes a Windows 10 machine can avoid getting it installed altogether if older programs are never installed on it.
The handy-dandy Windows OS error stating that win32/tidy.dll could not be found is actually the same exact error you get when a dependency of win32/tidy.dll cannot be found (in this case: MSVCR100.dll). Handy, I know. ![]() Make sure you get the x86 version of the redistributable runtime for Visual Studio 2010: https://support.microsoft.com/en-us/...f-95f26a218cc0 and you should be up and running. Or even more directly: https://www.microsoft.com/en-us/down....aspx?id=26999 Last edited by DiapDealer; 05-09-2021 at 06:53 PM. |
![]() |
![]() |
![]() |
#82 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,030
Karma: 11123121
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
@DiapDealer: Yes, that was the problem. Now that I installed Visual C/C++ runtime, both the CustomCleaner++ and the Html2Epub plugin work well.
One has to check for updates of Visual C/C++ manually, I suppose? I think I'll use the plugins frequently, as they produce an epub as I like. Thanks to all! |
![]() |
![]() |
![]() |
#83 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,799
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
So except for the rare program that needs the Visual 2010 or 2013 runtime, you should be good to go. And most program installers will tell you explicitly what you're lacking. It's only this rare case of including dlls with a python script where something might fall through the cracks. It used to be that Sigil itself would have provided the 2010 runtime for you. But that was back when Sigil was using VS2010 and VS2013 runtimes. I try to cross compile dlls for scripts like this with MinGW wherever possible to remove any dependencies upon a specific MSVCR version for precisely this reason. But I've ever tried building the newer libtidy-html5, so I don't know if that's easily doable. Glad its working for you now! |
|
![]() |
![]() |
![]() |
#84 |
Connoisseur
![]() Posts: 53
Karma: 10
Join Date: Jun 2021
Device: Onyx Boox Nova3
|
This plugin seems to mess up any pseudo-class or pseudo-element selectors by putting spaces after every colon in CSS files.
For instance Code:
p::first-letter { Code:
p: : first-letter { |
![]() |
![]() |
![]() |
#85 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,981
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Not sure if this is the reason or not but ..
::first-letter is css3 specific and thus epub3 not epup2. Under css 2.1 this would be just :first-letter |
![]() |
![]() |
![]() |
#86 |
Connoisseur
![]() Posts: 53
Karma: 10
Join Date: Jun 2021
Device: Onyx Boox Nova3
|
That's good to know about the difference in CSS, but p:first-letter also turns into p: first-letter, so I don't think that's the reason?
|
![]() |
![]() |
![]() |
#87 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,981
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Is this in an external but linked stylesheet or inside a style tag in the xhtml head tag? If the latter, have you tried converting it to an external stylesheet where it may not be parsed.
Perhaps the html parser being used does not grok pseudo classes. Again just a guess. |
![]() |
![]() |
![]() |
#88 |
Connoisseur
![]() Posts: 53
Karma: 10
Join Date: Jun 2021
Device: Onyx Boox Nova3
|
It is an external stylesheet.
Sent from my iPhone using Tapatalk |
![]() |
![]() |
![]() |
#89 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,981
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Its a bug in cutils2.py in the removeBadAttributesfromCSS(wdir, file) routine.
It does not properly skip over the selector line in the css and instead treats every line in the css file like an "property: value;" line and near the end of that routine does the following: Code:
else: if 'a:link' not in line and 'a:visited' not in line: if ':' in line: if ': ' in line: pass else: line = line.replace(':', ': ') outfp.write(line) Perhaps you can help the author of this plugin by making a list of all legal pseudo classes and psuedo elements so that a proper set of exclusions from applying this rule can be more easily added. Or alternatively, the author could use the python css-parser module that is part of every Sigil plugin environment, to screen things to only apply to property : value; lines of a selector and not the selector itself. Last edited by KevinH; 05-09-2022 at 10:39 AM. |
![]() |
![]() |
![]() |
#90 | |
Connoisseur
![]() Posts: 53
Karma: 10
Join Date: Jun 2021
Device: Onyx Boox Nova3
|
Quote:
I took a different tack and rewrote that whole if statement to only make a change if a : and ; are detected in the line. Which I think should help in most cases. I'm sure there's a flaw there too, if this code is covering both HTML and CSS files, but I think it errs on the side of not changing a thing instead of breaking it. I'm not entirely sure what this part of the code is intended to fix, to be honest. Just to make it look more readable/uniform? If that's the case, it's not taking into account the ' : ' I just saw in one book's CSS, so it's incomplete anyway. Which is fine, it just makes me not feel bad about my change being incomplete, haha. I think you're right that using a css parser would be the way to go, but my python skills are quite nascent, so I don't have the time to work it out. However I've noticed that Sigil has a 'ReformatCSSMultipleLines' command in Automate Lists that seems to do a pretty decent job. Interestingly, I can only find it in Automate lists, not as a menu command somewhere else, unless I'm missing something. Can a plugin call those commands? For now, this is what I ended up with for that section of code: Code:
else: if ':' in line and ';' in line: if ': ' in line: pass else: line = line.replace(':', ': ') else: pass outfp.write(line) |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
Problem with my ScrambleEbook plugin and the Plugin Updater tool | jackie_w | Development | 14 | 01-19-2017 10:49 PM |
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 |