Skip to content
sarnobat edited this page Jan 31, 2023 · 6 revisions

Installation

wget http://search.cpan.org/CPAN/authors/id/T/TE/TELS/graph/Graph-Easy-0.64.tar.gz
tar -xzf Graph-Easy-0.64.tar.gz
cd Graph-Easy-0.64
perl Makefile.PL
make test
sudo make install
PATH=$PATH:/opt/local/libexec/perl5.12/sitebin/graph-easy

If that doesn't work, try:

perl -MCPAN -e shell
install Graph::Easy

Use without Installation

cat my.grapheasy.txt | perl -I Graph-Easy-0.76/lib/  bin/graph-easy

Examples

Hello World

Execute:

echo "[ Bonn ] -- car --> [ Berlin ], [ Ulm ]" | graph-easy

Output

+--------+  car   +-----+
|  Bonn  | -----> | Ulm |
+--------+        +-----+
  |
  | car
  v
+--------+
| Berlin |
+--------+

Groups

cat <<EOF | graph-easy                         
[Bonn] --> [Berlin]
[Bonn] --> [Ulm]
(West Germany
[Bonn]
[Ulm]
)
EOF

Output:

+ - - - - - - - -+
' West Germany   '
'                '
' +------------+ '     +--------+
' |    Bonn    | ' --> | Berlin |
' +------------+ '     +--------+
'   |            '
'   |            '
'   v            '
' +------------+ '
' |    Ulm     | '
' +------------+ '
'                '
+ - - - - - - - -+
Clone this wiki locally