Skip to content

Commit

Permalink
First draft of script
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Apr 22, 2015
1 parent 28bbead commit f7a475b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions script/highlighting_table
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env ruby

require 'yaml'

ROOT = File.expand_path("../..", __FILE__)
LANGUAGES_PATH = File.join(ROOT, "lib", "linguist", "languages.yml")
LANGUAGES_FILE = YAML.load_file(LANGUAGES_PATH)

puts "| Languages | Codes"
puts "|-----------|-------"
LANGUAGES_FILE.each_pair do |language, data|
name = language.tr(' ', '-').downcase
extensions = (data['extensions'] || []).join(', ')
puts "#{language} | #{name}, #{extensions}"
end

0 comments on commit f7a475b

Please sign in to comment.