with-preview ( ..a graph quot: ( ..a path -- ..b ) -- ..b )


Vocabulary
graphviz.render.private

Inputs
graphan object
quota quotation with stack effect ( ..a path -- ..b )


Outputs
None

Definition


:: with-preview
( ..a graph quot: ( ..a path -- ..b ) -- ..b )
[
"preview" ".dot" [| code-file |
"preview" preview-extension [| image-file |
graph code-file ?encoding write-dot
code-file image-file try-preview-command
image-file quot call
] cleanup-unique-file
] cleanup-unique-file
] with-temp-directory ; inline