
題圖:來自網(wǎng)絡(luò)
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,安裝都很簡(jiǎn)單,
只需要命令行執(zhí)行:
apt-get install boxes
使用
boxes --help 查看幫助。linux工具使用大法,先看幫助。
boxes -l 查看有多少可以使用的盒子格式。 已知有個(gè)叫dog的盒子模型。
輸入echo "I am testing" | boxes -d dog -a c 將生成:
__ _,--="=--,_ __
/ \." .-. "./ \
/ ,/ _ : : _ \/` \
\ `| /o\ :_: /o\ |\__/
`-'| :="~` _ `~"=: |
\` (_) `/
.-"-. \ | / .-"-.
.---{ }--| /,.-'-.,\ |--{ }---.
) (_)_)_) \_/`~-===-~`\_/ (_(_(_) (
( I am testing )
) (
'---------------------------------------'
-d 參數(shù)表示選擇哪一個(gè)盒子模型,
-a 參數(shù)表示對(duì)齊方式。
自定義盒子模型
這個(gè)工具還支持自定義盒子模型。
我的使用方法
我配合boxes 寫了個(gè)vim插件,每次寫代碼的時(shí)候,就把這個(gè)狗頭放在我代碼的開頭
/* *
* @file
* @Brief
* @author
* @version v1.0
* @date 2016-10-31
*
* __ _,--="=--,_ __
* / \." .-. "./ \
* / ,/ _ : : _ \/` \
* \ `| /o\ :_: /o\ |\__/
* `-'| :="~` _ `~"=: |
* \` (_) `/
* .-"-. \ | / .-"-.
* .---{ }--| /,.-'-.,\ |--{ }---.
* ) (_)_)_) \_/`~-===-~`\_/ (_(_(_) (
* ( 0 Error(s) 0 Warning(s) )
* ) xxxxxx Wang@xxxxxx (
* '---------------------------------------'
*
*/
是不是也挺有意思的。