             [net.cgrand.enlive-html :as en]
             [net.cgrand.reload]
             [ring.adapter.jetty :refer [run-jetty]]))
+
+(defn sound-filenames []
+  (for [f (map #(.getName %) 
+               (.listFiles (io/file (io/resource "sound/processed"))))]
+    (let [base (last (re-find #"(.*)\.mp3" f))]
+      {:base base :full (str "sound/" f)})))
 
 (en/deftemplate page (io/resource "public/index.html") []
   [:body] 

  (resources "/fonts" {:root "vendor/bootstrap/fonts"})
  (resources "/css" {:root "vendor/bootstrap/css"})

  (GET "/*" req (page)))

(defn run [create-http-handler]

                       :href "css/bootstrap.css"}]))

    (en/append
      (en/html [:script {:type "text/javascript" :src "js/react.js"}]))
    
    (en/append
      (en/html
        (for [f (sound-filenames)]
          [:audio {:src (:full f) 
                   :preload "auto" 
                   :id (str "sample-" (:base f))}])))))

(defroutes routes
  (resources "/css" {:root "public/css"})
