Created
August 1, 2019 17:28
-
-
Save souenzzo/ec3bf7cd71c60a944bf65517b9473fbe to your computer and use it in GitHub Desktop.
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
(time (let [baos (ByteArrayOutputStream.) | |
data [[:foo :bar]]] | |
(-> (apply uber/multidigraph data) | |
(uber/viz-graph {:save {:format :svg | |
:filename baos}})) | |
(-> (xml/parse (io/input-stream (.toByteArray baos))) | |
(assoc-in [:attrs :data] (pr-str data)) | |
(xml/emit-str) | |
(.getBytes) | |
(io/input-stream) | |
(xml/parse) | |
:attrs | |
:data | |
edn/read-string))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment