Skip to content

Instantly share code, notes, and snippets.

@danielneal
Created March 10, 2017 16:26
Show Gist options
  • Save danielneal/c53d8abc5361df11f90a6fbeb2193809 to your computer and use it in GitHub Desktop.
Save danielneal/c53d8abc5361df11f90a6fbeb2193809 to your computer and use it in GitHub Desktop.
Command line tool for pretty-printing transit
#!/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