Skip to content

Instantly share code, notes, and snippets.

@zacclark
Created April 19, 2011 18:20
Show Gist options
  • Save zacclark/929134 to your computer and use it in GitHub Desktop.
Save zacclark/929134 to your computer and use it in GitHub Desktop.
f = File.open("./theme")
waiting = true
f.each_line do |line|
if waiting
#puts line
waiting = false if line.to_s == "[default]\r\n"
else
arr = line.split(" ")
#puts arr.inspect
puts "<key>#{arr[0]}</key>"
puts "<dict>"
puts " <key>Equivalents</key>"
puts " <array>"
puts " <string>#{arr[1]}</string>"
puts " </array>"
puts " <key>Name</key>"
puts " <string>#{arr[0].split(".").first}</string>"
puts "</dict>"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment