神奇的小工具boxes

boxes

Boxes is a command line program that draws a box around its input text. It can remove and repair those boxes, too. You can easily make your own box designs if you wish, but many designs are already provided.

boxex 是 linux 下的一款命令行工具,可以用字符组成盒子把你的文字包围在里面。
就像下面这样:

    Hello World!  ==>

     __________________
    /\                 \  
    \_|                |  
      |  Hello World!  |  
      |                |  
      |  ______________|_ 
      \_/_______________/


    /******************/
    /*                */
    /*  Hello World!  */
    /*                */
    /******************/

             \\\///
            / _  _ \
          (| (.)(.) |)
    .---.OOOo--()--oOOO.---.
    |                      |
    |     Hello World!     |
    |                      |
    '---.oooO--------------'
         (   )   Oooo.
          \ (    (   )
           \_)    ) /
                 (_/

安装

Debian 和 debian-based, 如 Ubuntu, 还有 Windows 10 Ubuntu Subsystem,安装都很简单,
只需要命令行执行:

apt-get install boxes

使用

boxes --help  查看帮助。linux工具使用大法,先看帮助。

boxes -l  查看有多少可以使用的盒子格式。 已知有个叫dog的盒子模型。

输入echo "I am testing" | boxes -d dog -a c 将生成:

          __   _,--="=--,_   __
         /  \."    .-.    "./  \
        /  ,/  _   : :   _  \/` \
        \  `| /o\  :_:  /o\ |\__/
         `-'| :="~` _ `~"=: |
            \`     (_)     `/
     .-"-.   \      |      /   .-"-.
.---{     }--|  /,.-'-.,\  |--{     }---.
 )  (_)_)_)  \_/`~-===-~`\_/  (_(_(_)  (
(             I am testing              )
 )                                     (
'---------------------------------------'

-d 参数表示选择哪一个盒子模型,
-a 参数表示对齐方式。

还有很多其他的图形,大家可以去玩玩。

说了这么多,这个东西到底有什么卵用,我是这么使用的。

我的使用方法

我配合boxes 写了个vim插件,每次写代码的时候,就把这个狗头放在我代码的开头

/* * 
 * @file 
 * @Brief  
 * @author                                                                                                                       
 * @version v1.0
 * @date 2016-10-31
 *
 *           __   _,--="=--,_   __
 *          /  \."    .-.    "./  \
 *         /  ,/  _   : :   _  \/` \
 *         \  `| /o\  :_:  /o\ |\__/
 *          `-'| :="~` _ `~"=: |
 *             \`     (_)     `/
 *      .-"-.   \      |      /   .-"-.
 * .---{     }--|  /,.-'-.,\  |--{     }---.
 *  )  (_)_)_)  \_/`~-===-~`\_/  (_(_(_)  (
 * (        0 Error(s) 0 Warning(s)        )
 *  )       xxxxxx Wang@xxxxxx            (
 * '---------------------------------------'            
 *                     
 */

是不是也挺有意思的。

点击阅读原文,可以找到boxes官网,可能要翻墙。

猜你喜欢

转载自blog.csdn.net/qw8880000/article/details/70184744