4 ms·
For the ASCII lovers, I made this simple web page to help convert dot to text diagrams: https://dot-to-ascii.ggerganov.com https://dot-to-ascii.ggerganov.com
by ggerganov 5y ago
For the ASCII lovers, I made this simple web page to help convert dot to text diagrams:
https://dot-to-ascii.ggerganov.com https://dot-to-ascii.ggerganov.com
It's useful to embed diagrams directly in source code for example.
Here is a sample [0]:
0.6
┌─────────────────────────┐
▼ │
┌───┐ 0.8 ┌───┐ 0.1 ┌───┐ 0.7 ┌───┐ 0.2 ┌───┐
│ d │ ─────▶ │ │ ◀───── │ e │ ─────▶ │ a │ ─────▶ │ b │
└───┘ │ c │ └───┘ └───┘ └───┘
│ │ 0.4 │
│ │ ◀──────────────────────────────────┘
└───┘
And a more complex example from a project of mine [1]:
┌─────────────┐
│ @tweet2doom │
│ │
│ ROOT │ ◀─────┐
└─────────────┘ │
▲ │
│ │
│ │
┌─────────────┐ ┌─────────────────┐
│ @player1 │ │ @player2 │
│ │ │ │
│ /play 50-u │ │ /play 30-l,50-f │
└─────────────┘ └─────────────────┘
▲ ▲
│ │
│ │
┌─────────────┐ ┌─────────────────┐
│ @tweet2doom │ │ @tweet2doom │
│ │ │ │
│ Video │ │ Video │
│ │ │ │
│ Start: 1 │ │ Start: 1 │
│ End:50 │ │ End:80 │
└─────────────┘ └─────────────────┘
▲
│
│
┌─────────────┐ ┌─────────────────┐
│ @tweet2doom │ │ │
│ │ │ @player2 │
│ Video │ │ │
│ │ │ /play 30-l │
│ Start: 80 │ │ │
│ End:110 │ ──▶ │ │
└─────────────┘ └─────────────────┘
[0] https://dot-to-ascii.ggerganov.com/?src_hash=476410d3 https://dot-to-ascii.ggerganov.com/?src_hash=476410d3
[1] https://dot-to-ascii.ggerganov.com/?src_hash=1ee7dcfe https://dot-to-ascii.ggerganov.com/?src_hash=1ee7dcfe
- cjlm 5y agoI love this and wrote about it in my newsletter on network thinking [0] – thank you! [0] https://sourcetarget.email/editions/17/ https://sourcetarget.email/editions/17/
- Godel_unicode 5y agoIf you're on mobile you're going to want to rotate your phone.
- tptacek 5y agoThis is fantastic.
- benreesman 5y agoThis is so friggin cool. I would kill to have this as like a Python library or something, any chance you’d open-source it? Or is there a GitHub link already and I overlooked it? Either way great job.
- ggerganov 5y agoThanks! It's already open sourced on Github [0] (there is a link on bottom right of the page). Note that the page is simply a wrapper of Graph::Easy [1], so nothing technically interesting to see in the repo - it just passes the HTML input to a command-line tool and prints the result. You can either use Graph::Easy directly on the command-line or you can use python to make an HTTP request to my page (example is shown in the README of [0]). [0] https://github.com/ggerganov/dot-to-ascii https://github.com/ggerganov/dot-to-ascii [1] https://metacpan.org/pod/Graph::Easy https://metacpan.org/pod/Graph::Easy
- ccakes 5y agoAwesome! Since switching from Mac to Linux I've been really missing Monodraw[1] for generating diagrams suitable for code comments. Emacs artist-mode is nice but I struggled to get the hang of it, will definitely be trying this! [1] https://monodraw.helftone.com/ https://monodraw.helftone.com/