#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), *%w[.. lib rainpress]) STDOUT.sync = true require 'rubygems' require 'optparse' options = {} opts = OptionParser.new do |opts| opts.banner = <<-EOF Usage: csspress [options] EOF opts.on('-c', "--comments", "Keep comments") { options[:comments] = false } opts.on('-n', "--newlines", "Keep newlines") { options[:newlines] = false } opts.on('-s', "--spaces", "Do NOT compress spaces") { options[:spaces] = false } opts.on('-k', "--colors", "Do NOT compress colors") { options[:colors] = false } opts.on('-m', "--misc", "Do NOT do misc compression") { options[:misc] = false } end opts.parse! puts Rainpress.new(File.read(ARGV[0]), options).compress!