Is it possible to draw ASCII diagram using Graphviz?
Something like that:
digraph
{
this -> is
this -> a
a -> test
}
Giv
Here is equivalent commands for linux:
First install cpanminus
sudo apt install cpanminus
After you can install GraphEasy
sudo cpanm Graph::Easy
Here is a sample usage
cat input.dot | graph-easy --from=dot --as_ascii
If you are not perl averse, graph-easy (and the associated Graph::Easy
package) can do exactly that:
http://search.cpan.org/~tels/Graph-Easy/
http://search.cpan.org/~tels/Graph-Easy/bin/graph-easy
On Mac you can install this with Homebrew and cpan:
brew install cpanminus
cpan Graph::Easy
It's easy to invoke after installation:
cat dotfile.dot | /opt/local/libexec/perl5.12/sitebin/graph-easy
Another option to use Graph::Easy
's ASCII functionality is directly from your browser through this small service that I hosted:
https://dot-to-ascii.ggerganov.com
Using graph-easy via docker. You can install whalebrew and use it to run graph-easy without installing too much dependancies on your local machine other than whalebrew and docker.
on MacOS with homebrew install docker
$ brew install docker
$ docker -v # check if docker is running
Install whalebrew - https://github.com/whalebrew/whalebrew (check installation alternatives)
$ brew install whalebrew
Install graph-easy via whalebrew
$ whalebrew install tsub/graph-easy
Now run it via
$ echo '[a]->[b]' | graph-easy
+---+ +---+
| a | --> | b |
+---+ +---+
By now, in ubuntu, you can install and use graph-easy directly:
> sudo apt install libgraph-easy-perl
[...]
> graph-easy dotfile.dot
+----+ +------+
| is | <-- | this |
+----+ +------+
|
|
v
+------+
| a |
+------+
|
|
v
+------+
| test |
+------+