View Single Post
Old 06-01-2012, 04:24 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by roger64 View Post
Hi

I am not sure this belong to the Sigil forum. Please forgive me if I am mistaken.

Ideally we all have clean style sheets. Nearly always. Sometimes, though, from a badly formatted file, after using a too trusting and not enough discriminating converter, some (many) unused styles land in the style sheet and clutter it.

As a prevention tool, just before publishing, I'd like to be sure that my style sheet contains only styles that are really used in the html files and to be able to discard the others.

I can imagine for example a script or a tool, parsing the style sheet, then counting and summing up the occurrences of styles in the html files. After that, a style showing 0 occurrence could probably be safely deleted.

Maybe there could be other solutions?
IMHO this is a EPUB forum question, but I will not move the thread unless requested because of possible overlap with Flightcrew checks.


Feature has been requested as part of the Calibre Quality Check PI.

Flightcrew only concerns itself with invalid EPUB syntax. Excess (unused) selectors is not against the rules. (In reality, Flightcrew does not complain if a selector does not exist and this should be at minimum, a Warning event . )
theducks is offline   Reply With Quote