aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrmckenzie <rmckenzie92@gmail.com>2013-03-13 10:18:41 -0500
committerrmckenzie <rmckenzie92@gmail.com>2013-03-13 10:18:41 -0500
commitce60606a67ac9b4315a3b8e4dd3ed2200089ef29 (patch)
tree0990a67da23fb22bb91ccdad4b20ffee20f0c4eb
parent7267b3b3a7e8c53d9c9926bb04cd9d2c476bab57 (diff)
drop tools.cli as a dep
-rw-r--r--project.clj3
-rw-r--r--src/me/arrdem/decomp/core.clj13
2 files changed, 8 insertions, 8 deletions
diff --git a/project.clj b/project.clj
index fd8f2ac..a4a61ea 100644
--- a/project.clj
+++ b/project.clj
@@ -1,10 +1,9 @@
-(defproject me.arrdem.decomp "0.1.0"
+(defproject me.arrdem.decomp "0.1.1"
:description "an HTML to Compojure translator"
:url "http://github.com/arrdem/decomp"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
- [org.clojure/tools.cli "0.2.2"]
[factual/fnparse "2.3.0"]
[lexington "0.1.1"]]
:main me.arrdem.decomp.core)
diff --git a/src/me/arrdem/decomp/core.clj b/src/me/arrdem/decomp/core.clj
index 1e0f289..b2a3431 100644
--- a/src/me/arrdem/decomp/core.clj
+++ b/src/me/arrdem/decomp/core.clj
@@ -1,13 +1,12 @@
(ns me.arrdem.decomp.core
(:require [clojure.pprint :refer [pprint]]
[me.arrdem.decomp.parser :refer [build-ast]]
- [me.arrdem.decomp.lexer :refer [html]]
- [clojure.tools.cli :refer [cli]])
+ [me.arrdem.decomp.lexer :refer [html]])
(:gen-class :main true))
-(defn process-string [s]
- (pprint (build-ast (html s))))
+(def process-string
+ (comp html build-ast))
(defn -main
"The only valid arguments are targeted files. If there are no targeted files
@@ -15,6 +14,8 @@ then decomp will target stdin as its token source."
[& args]
(if-not (empty? args)
(doseq [f args]
- (pprint (build-ast (html (slurp f)))))
+ (pprint (process-string (slurp f)))
+ (println ""))
- (pprint (build-ast (html (slurp (java.io.BufferedReader. *in*)))))))
+ (do (pprint (process-string (slurp (java.io.BufferedReader. *in*))))
+ (println ""))))