From 5ea07fd3eefc60c8143e1c721610c814b03082b8 Mon Sep 17 00:00:00 2001 From: Nathaniel Smith Date: Sat, 8 Nov 2014 20:15:06 -0500 Subject: [PATCH] oops --- scripts/userlist.hy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/userlist.hy b/scripts/userlist.hy index ecb01e0..71fcd00 100644 --- a/scripts/userlist.hy +++ b/scripts/userlist.hy @@ -31,16 +31,16 @@ (defn sort-user-list [usernames] (apply sorted [usernames] {"key" modify-time})) -(defn users [] (listdir "/home")) +(defn user-generator [] (-> (listdir "/home") + (filter (fn [f] (and (not (= f "ubuntu")) (not (= f "poetry"))))))) -(def user-list (->> (users) - (filter (fn [f] (and (not (= f "ubuntu")) (not (= f "poetry"))))) +(def user-list (->> (user-generator) sort-user-list reversed (map dir->html) (.join "\n"))) (print (.format "our esteemed users ({})
generated at {}
" - (len (users)) + (len (user-generator)) timestamp user-list))