CSS -> S2 properties conversion easement script
Tuesday, September 22nd, 2009 01:27 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Just wrote a quick script which parses out colors and the elements they apply to from a CSS stylesheet, to make it easier to match them to s2 properties.
Invoke by doing:
> css_to_s2.pl path/to/stylesheet
Can take multiple stylesheets. Actually, if it could parse out the colors from multiple stylesheets, and compare somehow pick out which colors were theme-specific, that would be pretty useful in conversion. (It does nothing of the sort now; it's just slightly easier this way than wading through the rest of the positioning, etc, code)
Mmm, not posting anywhere (else) until I figure out a better way to lay out the data. But I figure I could eventually put up a webpage as an interface in case anyone wants to use it quickly for conversion. Would need to be more careful about the input/output then, but that can wait until later.
Invoke by doing:
> css_to_s2.pl path/to/stylesheet
Can take multiple stylesheets. Actually, if it could parse out the colors from multiple stylesheets, and compare somehow pick out which colors were theme-specific, that would be pretty useful in conversion. (It does nothing of the sort now; it's just slightly easier this way than wading through the rest of the positioning, etc, code)
Mmm, not posting anywhere (else) until I figure out a better way to lay out the data. But I figure I could eventually put up a webpage as an interface in case anyone wants to use it quickly for conversion. Would need to be more careful about the input/output then, but that can wait until later.
no subject
Date: 2009-09-21 07:02 pm (UTC)http://wiki.dwscoalition.org/notes/Dev_Tools
no subject
Date: 2009-09-22 12:35 am (UTC)no subject
Date: 2009-09-22 01:27 pm (UTC)serves me right for not looking at the actual page!
Umm, I was going to commit, but realized I forgot how to authorize myself *rueful*
no subject
Date: 2009-09-21 11:33 pm (UTC)