~technomancy/fennel-lang.org

ref: 720592c61574fec92d38bf2f884b92d0368c4acc fennel-lang.org/signups.fnl -rw-r--r-- 528 bytes
720592c6Phil Hagelberg august user group 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
(local fennel (require :fennel))
(local view (require :fennelview))
(local lfs (require :lfs))

(each [filename (lfs.dir "signups")]
  (when (= :file (. (lfs.attributes (.. :signups/ filename)) :mode))
    (let [{:name name :email email :abstract abstract :confirmed confirmed}
         (fennel.dofile (.. "signups/" filename))
          name (.. name (: " " :rep (math.max 0 (- 8 (# name)))))]
      (print name email (if (and abstract (. arg 1)) abstract "")
             (if confirmed :confirmed (= confirmed false) :no)))))