-
Notifications
You must be signed in to change notification settings - Fork 39
Home
sarnobat edited this page Jan 31, 2023
·
6 revisions
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
cat my.grapheasy.txt | perl -I Graph-Easy-0.76/lib/ bin/graph-easy
Execute:
echo "[ Bonn ] -- car --> [ Berlin ], [ Ulm ]" | graph-easy
Output
+--------+ car +-----+
| Bonn | -----> | Ulm |
+--------+ +-----+
|
| car
v
+--------+
| Berlin |
+--------+
cat <<EOF | graph-easy
[Bonn] --> [Berlin]
[Bonn] --> [Ulm]
(West Germany
[Bonn]
[Ulm]
)
EOF
Output:
+ - - - - - - - -+
' West Germany '
' '
' +------------+ ' +--------+
' | Bonn | ' --> | Berlin |
' +------------+ ' +--------+
' | '
' | '
' v '
' +------------+ '
' | Ulm | '
' +------------+ '
' '
+ - - - - - - - -+