by arkades · 6y ago · 0 comments
I love markdown. It's an elegant tool for many situations. My own workflow depends on using Kiwi and Noteplan on my phone with a common dropbox directory for their files, which is a project directory for Sublime on my notebook and desktop. All of my organization is a centralized set of markdown'd text documents, be it my calendar or my knowledge base, sync'd across all of my devices and super-easily edited, searched, or converted to web pages.
But there is a point where using a simple and elegant tool stops being simple and elegant - it can only be tortured so far outside its intended use-case before it stops being useful.
I would be interested in a solution that can take graphviz files and output markdown-friendly diagrams, which can then be compiled back into vector diagrams.
https://codeyarns.com/2017/10/21/how-to-convert-dot-graph-to...
How do you visualise the diff of a diagram? How do you integrate it with git? That seems hard.
the "magic" of this would also make me uncomfortable. if i draw a diagram and the rendered output doesn't look the way i want it, i wouldn't know how to fix it.
Bonus points if it renders to Markdeep (or an equivalent) to be re-rendered as SVGs or whatever later on.
Edit: Here we go - http://asciiflow.com/
Boxes made out of asterisks, dashes, and slashes appeal to me about as much as cutlery made out of recycled tin cans and coat hangers; it's the worst of both worlds, too ugly to qualify as real graphics and too distracting to be useful as text. Weirdly, the look worse than 'graphics' on the Commodore PET or TRS-80 (whose 'graphic' characters were helpfully printed on the keys and accessible through combination button presses).
https://www.thegeekstuff.com/2009/12/how-to-create-ascii-dra...
https://github.com/vim-scripts/DrawIt
Pretty easy to create comments for code that need a drawing for clear expositions.
Makefile
all: example.html
example.html: example.md example.png
pandoc $< -o $@
example.png: example.dot
dot -Tpng $< -o $@
example.dot digraph G {
foo -> bar;
}
example.md # Example
Or just use zim ( https://zim-wiki.org/ ) which allows you to embed graphviz diagrams in any 'page', and many other features.
Yes, I do. I spend my time in a terminal all day and ASCII art is way more useful than an image reference which will never be able to load.
Show me a tool to export that powerpoint to ASCII and I'll be happy.
iTerm2, as one example, can display images just fine.
Images are fine as long as they don't fuck with line counts or column counts.
Benefits:
Fairly easy to learn syntax, and powerful enough for most technical documentation needs.
Easy to edit, easy to consume. No launching some heavy desktop app, no worrying about keeping PNG+source files up to date. (I do often use liveuml.com for editing any non-trivial diagrams though.)
Works with version control
Consistent style even when different people are working on diagrams
Drawbacks:
Not that pretty. Someone even mildly proficient at PowerPoint can make better-looking diagrams (though it takes longer). If you're doing internal or technical docs this isn't worth it, but for marketing/end-user facing stuff, maybe. I'll often just give my plantuml diagram to marketing and let them have a graphic designer pretty it up.
Less intuitive. The learning curve is a bit of a barrier for people that have spent years doing stuff in PowerPoint, and haven't yet bought into the other benefits. Especially for a simple diagram, it's hard to convince them to spend a couple hours so they can learn how to build it in 5-10 minutes with plantuml, vs just spending 10 minutes in PowerPoint. I think this is exacerbated by the fact a lot of the benefits come later when trying to edit and it gets more complex.
https://github.com/asciidoctor/asciidoctor/issues/1087
I love all the features of asciidoc but it bothers me they can't get the actual HTML generation right.
Documentation embedded in code docstrings. Yes, I could link to an external SVG but if you did that it wouldn't look great if I have to query the documentation via REPL.
![Figure [graph]: A more complex graph example](http://g.gravizo.com/svg?
digraph G {
main -> parse -> execute;
main -> init;
main -> cleanup;
execute -> make_string;
execute -> printf
init -> make_string;
main -> printf;
execute -> compare;
})I disagree. Linux kernel documentation and many manpages contain ascii diagrams that proved extremity useful for helping me understanding the them.
I really hope to see diagrams adopted into the markdown standard (CommonMark).
Maybe something very simple: A->B<-C similar to the syntax described for causal diagrams in Judea Pearl’s “The Book of Why”
For the particular offerings of these libraries, a higher quality, professional looking output is generated in a shorter time than powerpoint.
And most importantly, one can version control it, as the source is plain text
An alternative tool I've begun to like is TeXMe: https://github.com/susam/texme. It is like Markdeep but minimal--does not support any fancy features. Just plain Markdown and Latex. Very useful for note taking in a file that can publish itself. I don't think I can draw fancy diagrams while taking notes live so I don't need diagrams. So this simple tool serves me well.