Skip to content

Instantly share code, notes, and snippets.

@wavebeem
Created May 5, 2015 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wavebeem/c6ed7039cbc99550a552 to your computer and use it in GitHub Desktop.
Save wavebeem/c6ed7039cbc99550a552 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "nokogiri"
root = Nokogiri.parse(File.read("Empty.tmTheme"))
scopes = root
.css("plist dict array dict key")
.select {|key| key.text == "scope" }
.map {|key| key.next_element.text }
puts scopes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment