Skip to content

Instantly share code, notes, and snippets.

@aherrman
aherrman / format_css.rb
Created July 30, 2010 14:49
ruby script to beautify some compressed css. Based on script by floatless on stackoverflow: http://stackoverflow.com/questions/3372060/is-there-an-app-to-automatically-format-css-files/3372419#3372419
#!/usr/bin/ruby
#Formats CSS
input, output = ARGV
#Input
if input == nil or output == nil
puts "Syntax: #{$0} [input] [output]"
exit
end
# Echoes the name of the current screen, if any
function getScreenName {
if [ ${STY:-""} == "" ]; then
screen_name=""
else
screen_name="(`echo "${STY}" | sed 's/^[^\.]*\.//'`)"
fi
echo $screen_name
}