π 2017-Oct-21 ⬩ βοΈ Ashwin Nanjappa ⬩ π·οΈ ascii, dot, graph, graphviz, perl ⬩ π Archive
The GraphViz DOT is a super-simple language that makes it very easy to create graphs and export them to various graphical formats. However, there are situations where you want to generate an ASCII graph. For example, to embed a flowchart or digraph in source code or documentation. GraphViz provides no exporter that can output an ASCII graph.
Thankfully, I found that this can be achieved using a Perl module called Graph::Easy. It can use GraphViz to understand your DOT file and then convert that to an elegant ASCII graph.
Here is how to use that:
[code lang=βtextβ] $ sudo cpanm Graph::Easy
* The Graph::Easy module installs a **graph-easy** program which we use to convert DOT graph to ASCII:
[code lang="text"]
$ graph-easy life.dot
Tried with: Perl 5.22 and CPAN 1.61