Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 85f70b40e0
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (10 sloc) 0.52 kb
# Builds all of the word lists in ./wordlists/ into filter files in ./lang/
require 'lib/whatlanguage'
languages_folder = File.join(File.dirname(__FILE__), "lang")
wordlists_folder = File.join(File.dirname(__FILE__), "wordlists")
Dir.entries(wordlists_folder).grep(/\w/).each do |lang|
next if lang == 'generators'
puts "Doing #{lang}"
filter = WhatLanguage.filter_from_dictionary(File.join(wordlists_folder, lang))
File.open(File.join(languages_folder, lang + ".lang"), 'wb') { |f| f.write filter.dump }
end
Jump to Line
Something went wrong with that request. Please try again.