skip to navigation
skip to content

slimmer 0.1.30

HTML,XHTML,CSS,JavaScript optimizer is a whitespace optimizer for CSS, HTML and XHTML output. It’s written by Peter Bengtsson, in 2004-2005. Still maintained in 2008.


$ sudo easy_install slimmer


$ tar -zxvf slimmer-x.x.x.tgz
$ cd slimmer/
$ sudo python install


>>> import slimmer
>>> from slimmer import css_slimmer
>>> css_slimmer("h1, h2 { font-family: 'Courier New', Courier; }")
"h1,h2{font-family:'Courier New',Courier;border:1px solid black;}"
>>> html_slimmer('<a  href="x" title="   foo  bar  "> one </a>  <br />')
>>> from slimmer import html_slimmer, xhtml_slimmer
>>> html_slimmer('''<a  href="x" title="   foo  bar  "
                  > one </a>  <br/>''')
'<a href="x" title="   foo bar  "> one </a><br />'


$ cd slimmer/tests
$ python
$ python --verbose
File Type Py Version Uploaded on Size
slimmer-0.1.30.tar.gz (md5) Source 2009-11-06 16KB