Created
October 24, 2017 17:47
-
-
Save xbony2/db3c5efe0af6f826dc75f0f9e1e471f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Used to crawl Minecraft's index files and generate a list of languages that it supports. | |
file = "1.12.json" # Feel free to change this to whatever | |
languages = [] | |
File.open(file, "r").each do |line| | |
test_match = line.match(/"minecraft\/lang\/(.+)\.lang": {/) | |
next if test_match.nil? | |
languages << test_match[1] | |
end | |
languages.sort! | |
languages.each do |language| | |
puts language | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment