Created
March 10, 2017 16:26
-
-
Save danielneal/c53d8abc5361df11f90a6fbeb2193809 to your computer and use it in GitHub Desktop.
Command line tool for pretty-printing transit
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
#!/usr/local/bin/planck | |
(ns eqt.core | |
(:require [cljs.pprint :refer [pprint]] | |
[cljs.reader :as edn] | |
[planck.core :as planck] | |
[clojure.string :as string] | |
[cognitect.transit :as transit])) | |
(->> (repeatedly planck/read-line) | |
(take-while identity) | |
(string/join) | |
(transit/read (transit/reader :json)) | |
(pprint)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment