 (def position { "GK" "Goalkeeper", "DF" "Defender", "MF" "Midfielder", "FW" "Forward" })
 
 (def country-by-code {
-  "BRA" "Brazil", "ENG" "England", "ESP" "Spain", "FRA" "France", "GER" "Germany", "GRE" "Greece", "ITA" "Italy", "POR" "Portugal", "TUR" "Turkey"                      
+  "ALG" "Algeria", "BRA" "Brazil", "BUL" "Bulgaria", "ENG" "England", "ESP" "Spain", "FRA" "France", "GER" "Germany", "GRE" "Greece", "ITA" "Italy", "POR" "Portugal", "SCO" "Scotland", "TUR" "Turkey"                      
 })
 
 (def number read-string)

      (throw (Exception. (str "No country for " country-code)))
      { :name club, :country country })))

; Player conversion
(defn convert-player [country data]
  (let [shirt (number (data 0))]

      :height (number (data 5))
    }))

(defn convert-country [file]
  (let [filename (. file getName)
        country (second (re-find #"(\w+)." filename)) 
        raw (read-tabular-file file)]
    (map #(convert-player country %) raw)))


(def raw (read-tabular-file "2010/brazil.data"))

(def brazil (map #(convert-player "brazil" %) raw))

;(println (json/write-str brazil))

(def directory (clojure.java.io/file "2010/"))
(def files (rest (file-seq directory)))
(def file (first files))
(def filename (. file getName))

(println (convert-country file))
