Artifact 16ecfeb3d2367298865dc9b76cbb4932a0c24eec:
- Executable file scripts/cleancss.py — part of check-in [eba4a35a21] at 2011-08-08 04:53:38 on branch develop — Added web2py 1.98.2 (user: spiffy, size: 378) [annotate] [blame] [check-ins using] [more...]
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import re filename = sys.argv[1] datafile = open(filename, 'r') try: data = datafile.read() finally: datafile.close() data = re.compile('\s*{\s*').sub(' { ', data) data = re.compile('\s*;\s*').sub('; ', data) data = re.compile('\s*}\s*').sub(' }\n', data) data = re.compile('[ ]+').sub(' ', data) print data