Skip to content

Instantly share code, notes, and snippets.

@wavebeem
Created May 5, 2015 05:20
Show Gist options
  • Select an option

  • Save wavebeem/c6ed7039cbc99550a552 to your computer and use it in GitHub Desktop.

Select an option

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