HTML,XHTML,CSS,JavaScript optimizer
Project description
slimmer.py is a whitespace optimizer for CSS, HTML and XHTML output. It’s written by Peter Bengtsson, peter@fry-it.com in 2004-2005. Still maintained in 2008.
INSTALLATION:
$ sudo easy_install slimmer
Alternative:
$ tar -zxvf slimmer-x.x.x.tgz $ cd slimmer/ $ sudo python setup.py install
USAGE:
>>> 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 />'
UNITTESTS:
$ cd slimmer/tests $ python testSlimmer.py $ python testSlimmer.py --verbose
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slimmer-0.1.30.tar.gz
(17.0 kB
view details)
File details
Details for the file slimmer-0.1.30.tar.gz
.
File metadata
- Download URL: slimmer-0.1.30.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c4494ada8ebfd16b6bd673b76df7441ac5cc2b3eae3166c0abe2016230e76b |
|
MD5 | 37445985bad64baa04169dbe85930c3c |
|
BLAKE2b-256 | 9b8aea0e2f572e9dd4431a772e6c6bf427e4513b2f88fb7430907b19327c1335 |