Created
June 28, 2012 07:28
-
-
Save andydude/3009680 to your computer and use it in GitHub Desktop.
test-template
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
;; filename: src/test_template/core.clj | |
(ns test-template.core | |
(:require [clojure.java.io :as io] | |
[clostache.parser :as st] | |
[cheshire.core :as js])) | |
(defn render [template-filename json-filename] | |
(let [temp (str (line-seq (io/reader template-filename))) | |
data (js/parse-stream (io/reader json-filename) true)] | |
(st/render temp data))) | |
(defn -main [& args] | |
(println (apply render args))) |
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
(defproject test-template "1.0.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:dependencies [[org.clojure/clojure "1.3.0"] | |
[de.ubercode.clostache/clostache "1.3.0"] | |
[cheshire "4.0.0"]] | |
:main test-template.core) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment