hey Mastodon! what's a good tool for generating diagrams from code? preferably some diagram-oriented DSL that can be embedded in Markdown. i know of Mermaids but it has a very restricted class of diagrams it can draw which kind of sucks.
@beka_valentine I used to work with Tikz with LaTeX if it helps
@ricocotam @beka_valentine if OP is looking for Obsidian compatible specifically the Tikz plugin is a bit jank sometimes — particularly you can't use MathJAX inside Tikz blocks
@beka_valentine plantuml maybe
@bbigras @beka_valentine There is an IntelliJ plugin for generating PlantUML diagrams (full disclosure, I haven’t tried it, but I do like PlantUML)
@beka_valentine might be an option if you can use pandoc for your setup: https://github.com/diagrams/diagrams-pandoc
GitHub - diagrams/diagrams-pandoc: A pandoc filter to express diagrams inline using the haskell EDSL diagrams.

A pandoc filter to express diagrams inline using the haskell EDSL diagrams. - GitHub - diagrams/diagrams-pandoc: A pandoc filter to express diagrams inline using the haskell EDSL diagrams.

GitHub
@beka_valentine I've used plantuml and graphviz. Both are text based and play nice with Makefiles and git.
@beka_valentine have you tried https://diagrams.mingrammer.com ? Pure Python no DSL so not sure if that solves your use case
Diagrams · Diagram as Code

Diagram as Code

@beka_valentine plantUML AND you can use ChatGPT to write it in English
@beka_valentine plantuml and the mkdocs ecosystem is probably what you're after. Very good DX
@beka_valentine tikz is terrible and awful and the worst and best, most expressive piece of software i've ever used. good luck
@beka_valentine I mostly use PlantUML, there are also great extension for all sorts of diagrams. See https://plantuml.com/
Open-source tool that uses simple textual descriptions to draw beautiful UML diagrams.

Easily create beautiful UML Diagrams from simple textual description. There are also numerous kind of available diagrams. It's also possible to export images in PNG, LaTeX, EPS, SVG.

PlantUML.com

@beka_valentine well there's GraphViz dot...but its a bit unwieldy imo

https://graphviz.org/docs/layouts/dot/

Let me know what you find if you want, I'm also curious.

dot

[hierarchical or layered drawings](https://en.wikipedia.org/wiki/Layered_graph_drawing) of directed graphs.

Graphviz

@beka_valentine looks like dot is actually a generic format. I've only used it with Graphviz tho.

https://en.m.wikipedia.org/wiki/DOT_(graph_description_language)

DOT (graph description language) - Wikipedia

@beka_valentine @dalias I'm kind of partial to Pikchr¹, a super simple graph language very reminiscent of pic². It's built into the Fossil version control system³ and can render diagrams in markdown files committed to the repo⁴ or stored anywhere else in its collaboration tools, but it's also a one-line command to render them as SVG files with a pre-commit hook if you're using git.

¹: https://pikchr.org/home/doc/trunk/homepage.md

²: https://pikchr.org/home/doc/trunk/doc/differences.md

³: https://fossil-scm.org/home/doc/trunk/www/index.wiki

⁴: https://fossil-scm.org/home/doc/trunk/www/embeddeddoc.wiki

Pikchr: Documentation