Kroki – Convert plain text diagrams to images
kroki.io
kroki.io
I wanted to write the articles in Markdown and include the diagrams in there, so text-to-diagram tools seemed ideal. Turns out most of them give ridiculous layouts as soon as you have loops, with limited options to correct this. Other are based on ASCII art, so you control the overall layout, but the result usually has massive, awkward padding between everything. And then there's the holy grail, LaTeX with TikZ/PSTricks, which can give perfect results, but the time investment was a little discouraging. Result: I ended up making the diagrams with a good old SVG editor.
(And this is not entirely derailing the thread, since many of these papers are full of block diagrams, and a tool to generate nice DSP diagrams from text would be pretty useful)
Is it just my lack of practice, or is diagramming on a keyboard always awkward and slow? Or... do people generally surpass their freehand speed with enough practice, like with typing?
If not, is the ideal solution here a digital pen or wacom tablet with diagram detection / normalization software? Scanned napkins to mechanical turk? Something else?
Note: No disrespect though, the link is an amazing project for those that must type charts.
Could you share an example? GraphViz should handle loops easily.
digraph G {
rankdir=LR
node [shape=rectangle]
// nodes declared in order of horizontal position ("rank")
exciter
filter
subgraph H {
// nodes at the same horizontal rank
rank=same
plus [label="+"]
// invisible node for layout purposes
p1 [width=0, height=0, margin=0, label=""]
}
subgraph I {
rank=same
delay
nl
}
subgraph J {
rank=same
filter_ [label="filter"]
p2 [width=0, height=0, margin=0, label=""]
}
out
exciter -> filter -> plus -> delay -> filter_ -> out
filter_ -> p2 [arrowhead=none]
p2 -> nl -> p1 [arrowhead=none]
p1 -> plus
}
Here's the result: http://prntscr.com/n35czlOn a related note, CS professor John Regehr recently collected a bunch of ASCII-art diagrams from various source code into a blog post [0]. (The relation is that I had initially thought Kroki would be for things like this due to a faulty assumption of what the title meant by "plain text diagrams".)
https://demo.kroki.io/svgbob/svg/eNrFlEtvgkAQx-_9FBNPGqJiHxc...
Reading through the docs I stumbled upon "All the code is available on GitHub and our goal is to provide Kroki as a free service.". There has been definitely a good amount of work spent to build it, and there will be ongoing maintenance and infrastructure costs. Maybe I'm too naive, but how does the Kroki team plan to make the product financially sustainable?
Disclaimer: I'm the author.