master
tilde.town 2014-11-09 00:35:01 +00:00
parent 3663d11752
commit 35f28bac5c
1 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,10 @@
(def timestamp (.strftime (.now datetime) "%Y-%m-%d %H:%M:%S"))
(defn slurp [filename]
(.read (apply open [filename "r"] {"encoding" "utf-8"})))
(try
(.read (apply open [filename "r"] {"encoding" "utf-8"}))
(catch [e Exception]
"")))
(def default-html (slurp "/etc/skel/public_html/index.html"))
@ -22,7 +25,7 @@
(def user-list (->> (listdir "/home")
sorted
(filter (fn [f] (not (= f "ubuntu"))))
(filter (fn [f] (and (not (= f "ubuntu")) (not (= f "poetry")))))
(map dir->html)
(.join "\n")))