![]() |
#1 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,499
Karma: 22718641
Join Date: Dec 2010
Device: Kindle PW2
|
[Plugin] CSSValidator - Offline W3C CSS Validator
Released: February 7, 2022
Current Version: "0.0.7" This plugin allows you to validate CSS files with the offline version of the W3C CSS Validator. Disclaimer: Even though it's unlikely that the plugin will somehow corrupt the epub that you're working on or crash Sigil, you may want to save your ePub or create a checkpoint before running this plugin. Credits BeckyEbook and RbnJrg tested earlier versions; BeckyEbook also created the plugin icon. System requirements This plugin requires Java and Sigil 0.9.8 or higher. If you uncheck the Use Bundled Python option, you'll also need to install Python 3. To find out whether Java is installed, enter the following command in a terminal/command prompt window: java -version (should display java version "1.8.0_xx" or a higher version number) Installation 1. Select Manage Plugins from the Plugins menu and enable the Use Bundled Python option, if it isn't already enabled (or greyed out). 2. Click Add Plugin and select CSSValidator_v0.0.7.zip. This will install the plugin, which you can select via Plugins > Validation > CSSValidator. Settings Advanced users can change some CSS Validator settings by editing the following CSSValidator.json entries: Code:
"java_path": "java", Code:
"css_epub2_validation_spec": "css21", "css_epub3_validation_spec": "css3", If you want to validate them against different specs, simply change the default settings to one of the following values: css2, css21, css3 or css3svg. For example, you could use "css_epub3_validation_spec": "css3svg", to validate epub3 stylesheets against the CSS 3 + SVG specs. Code:
"ignore_message": [], Code:
"lang": "en" (As with all JSON files, the last entry must not be terminated by a comma.) To display the folder that contains CSSValidator.json select Edit > Preferences > Open Preferences Location. Then double-click plugins_prefs and CSSValidator. Windows users can also press WIN+R, paste %localappdata%\sigil-ebook\sigil\plugins_prefs\CSSValidator into the Run dialog box and hit Enter. Troubleshooting If you're getting a Python error: an exception of type JSONDecodeError occurred. error message for all epub files, most likely Java isn't installed or the Java binary couldn't be found. (You can download Java from the Oracle website.) License: GNU General Public License v3 (GPL-3) Last edited by Doitsu; 02-07-2022 at 03:00 PM. |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,784
Karma: 4526136
Join Date: Nov 2009
Device: many
|
Added to the Sigil Plugin Index. A great addition! Thank You!
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,495
Karma: 2941066
Join Date: Mar 2015
Device: Kindle Oasis1 & Voyage, iOS
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() I have been wishing for this for a long time ![]() |
![]() |
![]() |
![]() |
#4 | |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,310
Karma: 183024424
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,499
Karma: 22718641
Join Date: Dec 2010
Device: Kindle PW2
|
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,310
Karma: 183024424
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Works fine with OpenJDK for me, as well.
|
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
|
Strangely both plugins do not run with Oracles JRE on my mac. On my Mac i have to use oracles JDK. On Windows the JRE is sufficient.
Since I work mainly on Mac I have now installed OpenJDK without getting problems with the plugins. |
![]() |
![]() |
![]() |
#9 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,784
Karma: 4526136
Join Date: Nov 2009
Device: many
|
This is a long time bug in the Oracle macOS JRE installer as it does *not* update the system paths properly. The Oracle JDK installer does do it properly. So I always install the JDK if I am using Oracle java on macOS.
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
W3C Validator | JustinThought | Sigil | 2 | 08-21-2018 09:33 PM |
Offline CSS Validator? | odamizu | ePub | 9 | 04-13-2016 01:09 AM |
validate with W3C Validator question | Capricorn | ePub | 12 | 03-09-2016 03:25 PM |
W3C css Validator problem? | pete6055 | Sigil | 14 | 02-28-2013 09:19 AM |