3 ms·
Here's a function to create svg (default) or jpg for both sbcl and lispworks from graphviz: (defun make-svg (file-name &key jpg) #+lispworks (sys:call-sys
by gibsonf1 16y ago
Here's a function to create svg (default) or jpg for both sbcl and lispworks from graphviz:
(defun make-svg (file-name &key jpg)
#+lispworks (sys:call-system-showing-output
(string+ cl-user::*organontech-graphviz* (if jpg " -Tjpg " " -Tsvg ")
cl-user::*fcgaa-lean-mapping-path*
"/" file-name ".dot"
" -o "
cl-user::*fcgaa-lean-mapping-path*
"/" file-name (if jpg ".jpg" ".svg")))
#+sbcl (sb-ext:run-program cl-user::*organontech-graphviz*
(list (if jpg "-Tjpg" "-Tsvg")
(string+ cl-user::*fcgaa-lean-mapping-path* "/" file-name ".dot")
"-o"
(string+ cl-user::*fcgaa-lean-mapping-path* "/" file-name (if jpg ".jpg" ".svg")))
:output (weblog-stream)
)
)
(defun weblog-stream ()
(or (net.aserve:vhost-log-stream (net.aserve:wserver-default-vhost net.aserve:*wserver*))
t)) ;;sends output directly to html stream on portable allegroserve
(defmacro string+ (string &rest strings)
`(concatenate 'string ,string ,@strings))