**NAME** dia2kroki - convert textual descriptions for various diagram tools to image URL's using the https://kroki.io/ webservice. ====== # dia2kroki.tcl proc dia2kroki {text {dia graphviz} {ext svg}} { set b64 [string map {+ - / _ = ""} [base64url encode [zlib compress $text]]] set uri https://kroki.io//$dia/$ext/$b64 } ====== **EXAMPLE** ====== % source dia2kroki.tcl % puts [dia2kroki "digraph G { A -> B }"] https://kroki.io//graphviz/svg/eJxLyUwvSizIUHBXqFZwVNC1U3BSqAUAREAFzQ ====== This URL can be directly embedded into HTML pages or on Markdown code. Unfortunately as far as I know Tcler's Wiki can't embed external images without an extension like png, svg etc. So just the link to the image is shown. https://kroki.io//graphviz/svg/eJxLyUwvSizIUHBXqFZwVNC1U3BSqAUAREAFzQ To fix this we have to use the ''inlinehtml'' syntax: ====== <> . <> ====== Here the output: <> . <> ---- **DISCUSSION** Please discuss here: