KristopherPaulsen
10/3/2017 - 12:04 AM

clojure script boilerplate

clojure script boilerplate

;; Add a dependency to the classpath on the fly
(leiningen.exec/deps '[[enlive/enlive "1.1.4"]])

(require '[net.cgrand.enlive-html :as html])

;; Grab and print the title element from the Google front page using Enlive
(println (html/select (html/html-resource (java.net.URL. "http://google.com")) [:title]))


;; ------ More Info ---------------------------------------------------------------------------------------------
;; https://koodo.wordpress.com/2013/11/09/shell-scripting-with-clojure/