I have come to the conclusion there are two kinds of audience and two kinds of diagram, abs they almost exactly overlap
1. Engineering diagrams, explaining concepts to other engineers who are using the diagram as a jumping off point to deeper explorations
2. "Business" diagrams - the sort of thing we want to see in a Medium article or presentation. The style and correct placement matters far more than engineering.
The first is very amenable to markdown style production - often we want to spend no more than a few minutes creating the diagram. We get (60?) 80% of the way there with 20% effort.
But with every markdown approach I have tried the remaining 20% is flat out days of work. There is almost always a need to place that box there and have this one below and to the right and dammit the layout engine will not agree.
What I would ideally like is a combo - markdown to get me most of the way there, and then drop into some vector format that lets me tweak.
Have you tried PlantUML? It provides means of adjusting the layout.
I use it often, most of the time the adjustment is good enough for engineering communication within minutes of adjustment.
It could be better if there is more cohesive documentation of its support for the adjustment.
I had to search on Google many times to figure out how to add the adjustment.
The adjustment consists of directives of placement and direction of links, the length of links, grouping of notes, etc.
I feel that it's very promising with more popular support.
Embed diagrams in source code comments; build script greps through and writes out an SVG. A caveat is that to be adequately productive, you need rectangle-oriented editing, such as with Emacs’ “M-x string-rectangle”.
I agree. I looked at migrating our technical documentation out of MS Office documents into some diffable format and it were the diagrams that killed the initiative.
Tables are a pain, but most technical docs do not require rowspan and other things that are impossible to maintain in Markdown/reST/Asciidoc.
Diagrams are just a shitshow. PlantUML is the biggest player, and it tries to do the right thing by separating semantics and presentation, but kinda fails when your diagram grows too large.
I wish there was some tool that you could feed three separate human-readable inputs:
- styles, which let you define what your elements look like
- semantics, which let you describe your elements and relationships
- layout, which lets you manually rearrange the elements on your diagram (and is generated by a WYSIWYG tool)
Pikchr generates nice diagrams, but it's an all-in-one dialect. At least when I am reading well-written PlantUML I can understand the meaning of the diagram without seeing the rendered image.
The tool in the OP is nice, but it doesn't let you describe the layout at all.
I would love to see an integration with excalidraw where you write text to seed the diagram and then do the touch ups with something like excalidraw. That would solve I think your workflow.
diagrams.net (formerly draw.io) have an xml format that seems fairly open and they can also read/write a bunch of other formats (see here https://www.diagrams.net/blog/import-formats ) so something that gives you their xml format as a starting point might make sense.
Just use SVG plus d3. Only trick is coming up with a pipeline to convert this into a pdf or png so that it is easier to use outside the web.
I only throw in D3 because it does have some features which make SVGs more maintainable and easy to write, but I've written many SVGs by hand over the years and it really isn't nearly as bad as many people think it is. I suspect a lot of people think it is very difficult because they only look at the terrible SVGs generated by GUI tools.
I'm curious if you could get from an 80% solution to a 90% solution by just adding some markup to say things like, "This node should be to the left of this other one?"
Often I use invisible subgraphs to accomplish this sort of thing in GraphViz, but the markup for doing so is complicated and non-obvious.
I recently stumbled over a project which tries to do such an approach for graphs in scientific papers, to avoid people manually editing them and them getting disconnected from data sources. They do it by offering export of modified code generating the tweaked variant: https://pylustrator.readthedocs.io/en/latest/
agreed it would be nice if the markdown just generated a standard svg that you could then edit, or even just an html canvas where you can drag them around a bit more and add some color before exporting as an image
I use Mermaid (https://mermaid-js.github.io/mermaid/#/). The killer feature for me - you can write Mermaid scripts in your code comments and there's a plugin available for VS Code that will render it. It's awesome!
I'm in love. I want this as part of an assertion workflow for some of the graph building interfaces we're envisioning for biological data. For example you could allow lines to call from autocompletes, and store some metadata (e.g. extensions of labels) so that the whole widget could be embedded in your tool.
A lot of my emails are becoming like this - structured, bullet points, 'if-then-else' like statement although not that explicit. This could be a nice way to add visualisation to it. Maybe - although everytime I have tried to do something too different with email it has failed.
I would love to see this as a cli, I'm tired of PlantUML's[1] document compilation time. Guess even the plain text tools are made in React nowadays, sigh
I totally had this thought too when making it. The logic is super simple as-is, so I was scared if I went down the rabbit whole of trying to auto increment/decrement line numbers I might muddy things up. I'll see if add that functionality cleanly at some point (or if you'd like to feel free to take out a PR!) Thanks for the feedback!
I disagree. The simplicity here is a cool and rare feature.
This tool is amazing, and its coolness comes from the fact it's really simple. If you add "auto-adjusting" features that rewrite the code for you while writing, you're on the road to lose the simplicity and KISS aspect.
Please don't add new features, it's like gold as it is, @tone_row. The beauty and magic resides in the minimalism.
This seems really nice as a sketchpad for small flowcharts. I'd definitely use it to map out a small piece of work, because I'm terrible at laying out flowcharts on scrap paper without wasting space or painting myself into a corner.
One minor annoyance: I can't use tab/shift+tab to indent or dedent lines.
This is really cool. I frequently have to build reference architectures for work. I would love to add a feature where if you put quotes around a word, it would search for a folder of logos and add the tool's logo to the square.
For example, typing "Redshift" adds a Redshift db icon to the box.
The blank or edit file can be saved locally as URL or .HTM
file and can be reloaded and continue to be edited.
The UI is missing help, its only on the github page.
Since its just a html file I embedded the help in a comment
in the page. I just view source to look it up. It only adds a few hundred byte to each file.
Some functions don't work for me.
When I get a round tuit I will will try to figure out how it works.
In spite of this it is enough to create impromptu drawings to support a lecture. I save them and give it to the students as part of the notes.
I bet there's a lost history (or oral history, but they're the nearly same after 60+ years) of tools exactly like this that goes back to the times of the PDP-1 and super early hacker culture.
And I bet there's been a version of it written for every operating system at some point. It just seems so necessary and relatively straight forward.
I love when underlying data structures boil down to directed graphs. Turns out that indentation is a bad way to represent graphs (as someone who has tried many times to encode large Kubernetes service topologies in YAML). A language like dot or virgo (https://github.com/r2d4/virgo) seem more appropriate for this task
[+] [-] lifeisstillgood|5 years ago|reply
1. Engineering diagrams, explaining concepts to other engineers who are using the diagram as a jumping off point to deeper explorations
2. "Business" diagrams - the sort of thing we want to see in a Medium article or presentation. The style and correct placement matters far more than engineering.
The first is very amenable to markdown style production - often we want to spend no more than a few minutes creating the diagram. We get (60?) 80% of the way there with 20% effort.
But with every markdown approach I have tried the remaining 20% is flat out days of work. There is almost always a need to place that box there and have this one below and to the right and dammit the layout engine will not agree.
What I would ideally like is a combo - markdown to get me most of the way there, and then drop into some vector format that lets me tweak.
[+] [-] yubrshen|5 years ago|reply
[+] [-] everybodyknows|5 years ago|reply
https://github.com/blampe/goat
Embed diagrams in source code comments; build script greps through and writes out an SVG. A caveat is that to be adequately productive, you need rectangle-oriented editing, such as with Emacs’ “M-x string-rectangle”.
[+] [-] orthoxerox|5 years ago|reply
Tables are a pain, but most technical docs do not require rowspan and other things that are impossible to maintain in Markdown/reST/Asciidoc.
Diagrams are just a shitshow. PlantUML is the biggest player, and it tries to do the right thing by separating semantics and presentation, but kinda fails when your diagram grows too large.
I wish there was some tool that you could feed three separate human-readable inputs:
- styles, which let you define what your elements look like - semantics, which let you describe your elements and relationships - layout, which lets you manually rearrange the elements on your diagram (and is generated by a WYSIWYG tool)
Pikchr generates nice diagrams, but it's an all-in-one dialect. At least when I am reading well-written PlantUML I can understand the meaning of the diagram without seeing the rendered image.
The tool in the OP is nice, but it doesn't let you describe the layout at all.
[+] [-] vjeux|5 years ago|reply
[+] [-] codeulike|5 years ago|reply
discussion of format: https://stackoverflow.com/questions/59416025/format-of-draw-...
Looks like they have an api too: https://jgraph.github.io/mxgraph/docs/js-api/files/index-txt...
[+] [-] aembleton|5 years ago|reply
[+] [-] slaymaker1907|5 years ago|reply
I only throw in D3 because it does have some features which make SVGs more maintainable and easy to write, but I've written many SVGs by hand over the years and it really isn't nearly as bad as many people think it is. I suspect a lot of people think it is very difficult because they only look at the terrible SVGs generated by GUI tools.
[+] [-] mumblemumble|5 years ago|reply
Often I use invisible subgraphs to accomplish this sort of thing in GraphViz, but the markup for doing so is complicated and non-obvious.
[+] [-] arbie|5 years ago|reply
[+] [-] detaro|5 years ago|reply
[+] [-] lifeisstillgood|5 years ago|reply
"A picture paints a thousand words", so why should we expect it possible to describe some pictures with less words.
Some paintings can be described effectively with "four tins of campbells tomato soup, one in each quadrant".
Other pictures cannot - "Adam reaching out to touch Gods finger"
Maybe we just need to paint sometimes, and maybe learn the difference between the two kinds - when we need to escape from code.
[+] [-] statstutor|5 years ago|reply
You can write the markdown and then drag and drop boxes (or directly edit the SVG).
[+] [-] joshspankit|5 years ago|reply
Have the simple ones front and centre, but also go full pedal to the medal and show flesh out the really complex ones.
Recent and related shout-out: Neo4J has thankfully included some on their API documentation.
[+] [-] safanycom|5 years ago|reply
[+] [-] plainoldcheese|5 years ago|reply
[+] [-] smusamashah|5 years ago|reply
Input in this one is very simple and cool.
[+] [-] Veuxdo|5 years ago|reply
It's heavier-duty compared to most of the others you have listed, but should appeal to engineers who want something more robust.
[+] [-] kenny87|5 years ago|reply
[+] [-] ciceryadam|5 years ago|reply
[+] [-] mysterydip|5 years ago|reply
[+] [-] breck|5 years ago|reply
[+] [-] taylodl|5 years ago|reply
[+] [-] naebother|5 years ago|reply
[+] [-] awaythro15234|5 years ago|reply
https://pikchr.org/home/doc/trunk/homepage.md
[+] [-] Zhyl|5 years ago|reply
If you guys haven't tried building up a diagram, live, step by step like an ad-hoc slideshow, I seriously recommend it.
[+] [-] xipho|5 years ago|reply
[+] [-] monkeydust|5 years ago|reply
[+] [-] augusto-moura|5 years ago|reply
[1]: https://plantuml.com/
[+] [-] pionar|5 years ago|reply
[+] [-] layer8|5 years ago|reply
[+] [-] tonerow|5 years ago|reply
[+] [-] sixti60|5 years ago|reply
This tool is amazing, and its coolness comes from the fact it's really simple. If you add "auto-adjusting" features that rewrite the code for you while writing, you're on the road to lose the simplicity and KISS aspect.
Please don't add new features, it's like gold as it is, @tone_row. The beauty and magic resides in the minimalism.
[+] [-] voxic11|5 years ago|reply
[+] [-] enlightens|5 years ago|reply
https://www.luminoslabs.com/insights/text-based-charts-with-...
[+] [-] flying_sheep|5 years ago|reply
[+] [-] webdevatlurk|5 years ago|reply
One minor annoyance: I can't use tab/shift+tab to indent or dedent lines.
[+] [-] tonerow|5 years ago|reply
[+] [-] zupreme|5 years ago|reply
Present feeling: They finally got it right. This is how flowcharts should be made, by default.
[+] [-] msci100|5 years ago|reply
For example, typing "Redshift" adds a Redshift db icon to the box.
[+] [-] bleepbaboop|5 years ago|reply
Some text(2) Yes: (line num) No: (line num)
[+] [-] flanbiscuit|5 years ago|reply
You can do it now with full nodes but would be nice to have a specific node type for that
[+] [-] prosaic-hacker|5 years ago|reply
The blank or edit file can be saved locally as URL or .HTM file and can be reloaded and continue to be edited.
The UI is missing help, its only on the github page. Since its just a html file I embedded the help in a comment in the page. I just view source to look it up. It only adds a few hundred byte to each file.
Some functions don't work for me. When I get a round tuit I will will try to figure out how it works.
In spite of this it is enough to create impromptu drawings to support a lecture. I save them and give it to the students as part of the notes.
[+] [-] jazzex|5 years ago|reply
Exports to json or image.
[+] [-] tijuco2|5 years ago|reply
[+] [-] kleer001|5 years ago|reply
I bet there's a lost history (or oral history, but they're the nearly same after 60+ years) of tools exactly like this that goes back to the times of the PDP-1 and super early hacker culture.
And I bet there's been a version of it written for every operating system at some point. It just seems so necessary and relatively straight forward.
[+] [-] oneweekwonder|5 years ago|reply
Alternatives is blockdiag[0] with a online demo[1], and then of course graphviz[2] shipped with most distro(s).
[0]: http://blockdiag.com
[1]: http://blockdiag.com/en/blockdiag/demo.html
[2]: https://graphviz.org
[+] [-] rckrd|5 years ago|reply
[+] [-] jsmcgd|5 years ago|reply
Also an ability to click a line and create a connected node.
Also it would be great to drive the app from the diagram, ie generate text from the diagram.
Anyway I like it. I've used Linux Mint's built in Web Apps tool to create an offline version.
[+] [-] yardshop|5 years ago|reply