Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Last active February 3, 2016 10:52
Show Gist options
  • Save trikitrok/a64b5e2dbd8df9256f75 to your computer and use it in GitHub Desktop.
Save trikitrok/a64b5e2dbd8df9256f75 to your computer and use it in GitHub Desktop.
What I use to select my next read from my post reading queue
(defn next-read []
(->>
(clojure.java.io/file ".")
(.listFiles)
seq
(remove #(.isDirectory %))
rand-nth
(.getName)))
(println (next-read))
;; Run
;; lein exec next-read.clj
;; in the folder where the post reading queue is.
;; you need to have lein-exec plugin installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment