Skip to content

Instantly share code, notes, and snippets.

@kapkaev
Forked from releu/export_words.rb
Created August 30, 2013 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kapkaev/6394494 to your computer and use it in GitHub Desktop.
Save kapkaev/6394494 to your computer and use it in GitHub Desktop.
files = Dir["./**/*"]
files.each do |file|
next if File.directory?(file)
words = []
begin
File.read(file).scan /[\u0400-\u04FF\-]+/ do |match|
words << match
end
rescue # skip images, fonts, etc
end
if words.any?
puts file, words.uniq.join(" ")
end
end
# then go to http://api.yandex.ru/speller/ and check spelling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment