Last active
February 3, 2016 10:52
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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