(WIP) implementing CBD language... Meta-meta-model: Association inherits from Class. Matcher accepts pivot. Add generic graphviz renderer.

This commit is contained in:
Joeri Exelmans 2024-11-07 09:46:29 +01:00
parent a26ceef10f
commit 1eb8a84553
25 changed files with 542 additions and 170 deletions

View file

@ -0,0 +1,12 @@
from concrete_syntax.common import indent
import urllib.parse
def make_url(graphviz_txt: str) -> 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)
# Keeping this one here just in case:
# return "https://dreampuf.github.io/GraphvizOnline/#"+urllib.parse.quote(graphviz)