terrastruct / d2

D2 is a modern diagram scripting language that turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
16.51k stars 414 forks source link

draw.io (diagrams.net) files format (mxGraph) export / import #743

Open iAdanos opened 1 year ago

iAdanos commented 1 year ago

Since draw.io is (in some sense) a standard tool for many organizations and projects, it would be great to add a capability to use drawio.xml (mxGraph) as an input/output file format.

Even since draw.io uses another concept, this could be useful in particular when a base for a diagram is described with D2 and then draw.io is used to polish it and to apply some corporate standards / styles / add some advanced shapes / integrate it with an existing diagrams / etc. In addition, this would allow using all the tools built around draw.io to embed such diagrams (e.g. in Confluence or in Grafana).

Import feature (at least for standard shapes and connections) would also bring much of benefits to the projects that would like to migrate to D2 with Diagrams as a Code approach, but rebuilding legacy documentation and rewriting diagrams would require significant effort.

Maybe it would be enough to create some standalone converter like graphviz2drawio, but integrated support would become a painkiller for many users.

mrpackethead commented 1 year ago

Definately support this.