View Full Version : Any Cleanup tools


theducks
09-09-2010, 08:06 PM
After staring at many a monster-messy CSS using Sigil, I have a wish for tools.
1) A tool that sorts the CSS selectors so it is easy to locate (and pretty them u for consistency)

2) A Where used (in the Epub) report, that lists each section (and count) where a selector is used


3) Duplicate selector CONTENT, locator tool, that reports selectors that have basically the same, exact attributes.
.para34, .para37, .para123...
you must have seen those OMG 900 line, conversion, style messes

pholy
09-10-2010, 08:53 AM
I guess I cheat... I use tidy to convert from html to xhtml and gather up the style info into one place in the <header>; then I delete all that and change <p class=... > into <p>. Then I write a stylesheet.css that does what I want.

I know that loses all the classes, but it works fairly well for simple book conversions.

But, yes, I have been thinking about a parser that does what you want, at least items 2 & 3. I'll get to it eventually, unless someone else does it first.

theducks
09-10-2010, 12:17 PM
I guess I cheat... I use tidy to convert from html to xhtml and gather up the style info into one place in the <header>; then I delete all that and change <p class=... > into <p>. Then I write a stylesheet.css that does what I want.

I know that loses all the classes, but it works fairly well for simple book conversions.

But, yes, I have been thinking about a parser that does what you want, at least items 2 & 3. I'll get to it eventually, unless someone else does it first.

Thanks (in advance, too :D )

Not being a HTML or CSS "expert"
I went looking for tools. I did find some CSS creation tools. The big problem then, would be making them work on a ePub directly (tot having to tear it apart and the put it back properly) Once I have a report, I can use Sigil to adjust the individual segments.
One of my goals from the where used report is to make the CSS "Lean and Mean". Only have itemes that are used ( I see a number of publishers that seem to use a "Stock" CSS, with ever selector they have ever used :o in them.