add petri net renderer (graphviz-based)
This commit is contained in:
parent
a0eb56421f
commit
3aec288e37
3 changed files with 33 additions and 2 deletions
|
|
@ -1,12 +1,12 @@
|
|||
from concrete_syntax.common import indent
|
||||
import urllib.parse
|
||||
|
||||
def make_url(graphviz_txt: str) -> str:
|
||||
def make_url(graphviz_txt: str, engine="dot") -> str:
|
||||
|
||||
as_digraph = f"digraph {{\n{indent(graphviz_txt, 2)}\n}}"
|
||||
|
||||
# This one seems much faster:
|
||||
return "https://edotor.net/?engine=dot#"+urllib.parse.quote(as_digraph)
|
||||
return f"https://edotor.net/?engine={engine}#{urllib.parse.quote(as_digraph)}"
|
||||
|
||||
# Keeping this one here just in case:
|
||||
# return "https://dreampuf.github.io/GraphvizOnline/#"+urllib.parse.quote(graphviz)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue