3 ms·
Perl has a module called 'Graph::Easy' which can create a diagram from a graph automatically, and can also do ASCII-output. See http://bloodgate.com/graph-demo
by Luyt 15y ago
Perl has a module called 'Graph::Easy' which can create a diagram from a graph automatically, and can also do ASCII-output. See http://bloodgate.com/graph-demo http://bloodgate.com/graph-demo for an interactive demo.
[Sun] -- [Pear]
[Apple] --> [Pear]
[Pear] -- [fruit] --> [Pineapple]
[Pear] --> [Cherry]
[fruit] ==> [Done]
Renders to:
+--------+
| Cherry |
+--------+
^
|
|
+-------+ +--------+ +-------+ +-----------+
| Apple | --> | Pear | --- | fruit | --> | Pineapple |
+-------+ +--------+ +-------+ +-----------+
| H
| H
| v
+--------+ +-------+
| Sun | | Done |
+--------+ +-------+
- Luyt 15y agoIt's a pity that the GraphViz family of automatic graph drawing tools don't support ASCII: (user@air) /Users/user $ dot -Tascii Format: "ascii" not recognized. Use one of: bmp cgimage cmap cmapx cmapx_np dot eps exr fig gd gd2 gif gv imap imap_np ismap jp2 jpe jpeg jpg pct pdf pict plain plain-ext png ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz vrml wbmp x11 xdot xlib canon
- mvuets 15y agoThere is a similar Java application also: http://ditaa.sourceforge.net/ http://ditaa.sourceforge.net/ But it works in a bit different way: converts such ASCII diagrams into bitmap graphics.