#!/usr/bin/env ruby
# Textmate bundle command to change HTML attr to symbol
# I normally use this when working with html files from designer
# so line like this id="logo" class="left" converted to , :id => "logo", :class => "left"
def to_options(str)
str.gsub(/((\s|^)(\w+))(=)/i) {|v| ", :#{$3} #{$4}> "}
end
print to_options(STDIN.read)