Skip to content

Instantly share code, notes, and snippets.

@wavebeem
Created May 5, 2015
Embed
What would you like to do?
#!/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