美文网首页
使用 Graph-Easy 绘制 ASCII 图

使用 Graph-Easy 绘制 ASCII 图

作者: 信鑫_King | 来源:发表于2017-07-18 13:26 被阅读710次

看文档时,会看到这种字符画出来的流程图,简洁又美观,那这种图怎么画出来的呢? 答案是 Graph-Easy .

+------+     +---------+     .............     +---------+
| Bonn | --> | Berlin  | --> : Frankfurt : --> | Dresden |
+------+     +---------+     :...........:     +---------+
               :
               :
               v
             +---------+     +-----------+
             | Potsdam | ==> |  Cottbus  |
             +---------+     +-----------+

Graph-Easy 的安装,官网写的不是太明确,试了好几种方法,才找到一种好用的安装方法。

安装

官网 左侧边栏中找到 Download (大概456.23Kb),下载下来。

然后在 终端 命令行中输入以下命令:

$ tar -xzf Graph-Easy-xxx.tar.gz 
$ chdir Graph-Easy-xxx
$ perl Makefile.PL 
# 执行测试
$ make test 
# 测试全部ok后,用超级用户安装
$ sudo make install

然后就可以使用 graph-easy 命令

使用

语法简洁,很容易上手。参照官方使用文档

SnapShot

$ echo "[ Bonn ] -> [ Berlin ] [ Berlin ] -> [ Frankfurt ] { border: 1px dotted black; } [ Frankfurt ] -> [ Dresden ] [ Berlin ] ..> [ Potsdam ] [ Potsdam ] => [ Cottbus ]" | graph-easy

原文:信鑫-King's Blog » 使用 Graph-Easy 绘制 ASCII 图

相关文章

网友评论

      本文标题:使用 Graph-Easy 绘制 ASCII 图

      本文链接:https://www.haomeiwen.com/subject/qjxhkxtx.html