[关闭]
@Dukebf 2017-11-17T07:52:12.000000Z 字数 674 阅读 1389

文字模式下的 ASCII 艺术与注释绘画

开发


前人轮子:
Linux/Unix 桌面趣事:文字模式下的 ASCII 艺术与注释绘画

序言

在开发命令行软件时,有时候需要可能想要在软件运行时,出现一个酷酷的banner.
就类似于下面这种:

我们可以借助命令行软件boxes来完成制作.

安装

Ubuntu/Debian 用户

  1. # apt-get install boxes

RHEL / CentOS / Fedora Linux 用户

  1. # yum install boxes

使用

使用例子:

Example1:

  1. # echo -e "This is a example" | boxes

效果如下:

  1. /*********************/
  2. /* This is a example */
  3. /*********************/

Example2:

  1. # echo -e "\nAsset Hunter\nVersion 0.1\nhttps://github.com/" | boxes -d sunset

效果如下:

  1. .
  2. . | .
  3. \ | /
  4. '. \ ' / .'
  5. '. .'```'. .'
  6. <>...:::::::`.......`:::::::..<>
  7. <>: :<>
  8. <>:Asset Hunter :<>
  9. <>:Version 0.1 :<>
  10. <>:https://github.com/ :<>
  11. <>:..........................:<>
  12. <><><><><><><><><><><><><><><><>

参数说明

语法规则:

-d : 是用来选择图案的

查看能使用的图样

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注