Last active
June 17, 2017 17:51
-
-
Save KingC100/1b256cf3eab0aa37f714 to your computer and use it in GitHub Desktop.
dot->png use to sbcl.
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
(defun dot->png (fname thunk) | |
(with-open-file (*standard-output* | |
fname | |
:direction :output | |
:if-exists :supersede) | |
(funcall thunk)) | |
(shell (concatenate 'string "dot -Tpng -O " fname))) | |
(defun shell (x) | |
(run-program "/bin/sh" (list "-c" x) :output t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment