https://metacpan.org/pod/Graph::Easy http://bloodgate.com/perl/graph/manual/
graph.txt markup
For instance this input:
[ Bonn ] -> [ Berlin ]
[ Berlin ] -> [ Frankfurt ] { border: 1px dotted black; }
[ Frankfurt ] -> [ Dresden ]
[ Berlin ] ..> [ Potsdam ]
[ Potsdam ] => [ Cottbus ]
would be rendered in ASCII as:
+------+ +--------+ ............. +---------+
| Bonn | --> | Berlin | --> : Frankfurt : --> | Dresden |
+------+ +--------+ ............. +---------+
:
:
v
+---------+ +---------+
| Potsdam | ==> | Cottbus |
+---------+ +---------+
The HTML or SVG output would look similiar except be more pretty :o)
output
It can output to ascii, boxart, svg, dot, and a html. The html and svg outputs aren't very useful, but the other ones are all great.
dot
This format is the format used by graphviz
which is an extremely powerful
graphing tool that can output to maney different formats (but can't do ascii or
boxart).
graph-easy overview_graph.txt -as_dot | dot -Tsvg -o graph.svg
boxart
The boxart output mode uses unicode lines to draw a pretty great looking graph. I removed the dotted border option from the earlier example, it doesn't look as good in boxart.
graph-easy graph.txt -as_boxart
┌──────┐ ┌─────────┐ ┌───────────┐ ┌─────────┐
│ Bonn │ ──> │ Berlin │ ──> │ Frankfurt │ ──> │ Dresden │
└──────┘ └─────────┘ └───────────┘ └─────────┘
:
:
∨
┌─────────┐ ┌───────────┐
│ Potsdam │ ══> │ Cottbus │
└─────────┘ └───────────┘