Skip to content

Commit

Permalink
Move lists to subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
ttencate committed May 25, 2012
1 parent 7762c29 commit 06f9c52
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1 +1 @@
*.list
lists
4 changes: 2 additions & 2 deletions crosswordfinder.rb
Expand Up @@ -5,8 +5,8 @@ class Finder
include Singleton

def initialize
lists_dir = File.dirname(__FILE__)
language_files = Dir.glob(File.join(lists_dir, '*.list'))
lists_dir = File.join(File.dirname(__FILE__), 'lists')
language_files = Dir.glob(File.join(lists_dir, '*'))
@languages = {}
language_files.each do |language_file|
puts "Loading #{language_file}..."
Expand Down
9 changes: 6 additions & 3 deletions dump.sh
@@ -1,25 +1,28 @@
#!/bin/sh

LIST_DIR=lists
mkdir -p $LIST_DIR

aspell -l nl dump master \
| iconv -f utf8 -t ascii//translit \
| tr '[A-Z]' '[a-z]' \
| egrep '^[a-z]+$' \
| sort \
| uniq \
> Nederlands.list
> $LIST_DIR/Nederlands

aspell -l en_GB dump master \
| iconv -f utf8 -t ascii//translit \
| tr '[A-Z]' '[a-z]' \
| egrep '^[a-z]+$' \
| sort \
| uniq \
> 'English (GB).list'
> $LIST_DIR/'English (GB)'

aspell -l en_US dump master \
| iconv -f utf8 -t ascii//translit \
| tr '[A-Z]' '[a-z]' \
| egrep '^[a-z]+$' \
| sort \
| uniq \
> 'English (US).list'
> $LIST_DIR/'English (US)'

0 comments on commit 06f9c52

Please sign in to comment.