我试过figlet,但效果不太好。还有其他的ASCII编辑器吗?
![alt text](https://istack.dev59.com/zsFHF.webp)
软件仓库中另一个好用的程序是jp2a
,并且官方网站上有一些很好的文档,还可以在official site和Ubuntu manpage上找到相关信息。
需要说明的是,该程序可以转换任何jpg文件,但最好使用简单、标志或卡通样式的图片,效果更好。如果您需要先将图像转换为jpg格式,只需使用imagemagick's
的convert工具运行convert logo.png logo.jpg
即可。
jp2a
选项来指定使用的字符、ascii的大小或者反转表示。一旦你设置正确,你可以得到很好的结果,就像我在下面的截图中展示的那样。然而,结果很大程度上取决于你选择转换为ascii的图像。ubuntu-logo.jpg
在你当前工作目录中)jp2a -i --chars="..00xx@@" ubuntu-logo.jpg | tee ubuntu-logo.txt
echo -en "hello\nworld" | python3 -c "import sys; from PIL import Image, ImageDraw, ImageFont; img=Image.new('RGB',(800,600)); draw = ImageDraw.Draw(img); font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeMono.ttf', 20); [draw.text((0, i[0]*20), i[1].rstrip('\n'), (255,255,255), font=font) for i in enumerate(sys.stdin)]; img.save('sample-out.png')" && display sample-out.png
- Janus Troelsen你可以使用 cowsay
工具,并输入一行简单的命令来学习新的命令。
安装 cowsay
sudo apt-get install cowsay
~/
的.bashrc
或.zshrc
文件中,即~/.bashrc
或~/.zshrc
,以获取ASCII艺术字符。cowsay -f $(ls /usr/share/cowsay/cows | shuf -n 1 | cut -d. -f1) $(whatis $(ls /bin) 2>/dev/null | shuf -n 1)
我喜欢Linux-logo (http://www.deater.net/weave/vmwprod/linux_logo/)。 尝试将它添加到任何终端的开始。尝试找到适合Ubuntu的正确标志(-L)...
我在我的Python脚本中使用asciio。如何安装:
apt-get install asciio
/usr/local/bin
或/usr/local/games
。
Ubuntu的额外要求
从apt获取perl的curses包。
sudo apt-get install libcurses-perl
在shell中运行。对所有默认值都同意。要退出cpan,请键入
输入:
sudo cpan Term::Animation
y#▓▓▓▓▓▄
#▓▓▓▓▓▓▓▓▓
¿╓╔###║###M╔ ▓▓▓▓▓▓▓▓▓▓
╙║║║║║║║║║║║║║░ └▓▓▓▓▓▓▓▓┘
╔╠░ ║║║║║║║║║║║║║N, └╙╩╩╙└
╔╠╠╠╠╠, ╚║║║║║║║║║║║║║║M╔╓╓╓#N,
╓╠╠╠╠╠╠╠╠∩ ╙╙ └╙╙║║║║║║║║║║║N
#╠╠╠╠╠╠╠╠╠╚ ╙║║║║║║║║║║
╔╠╠╠╠╠╠╠╠╚ ╙║║║║║║║║║
.╓╔╔╓, ╙╠╠╠╠╠╠╚ ╙║║║║║║║║Γ
.║║║║║║║║, ╠╠╠╠╠ ║║║║║║║║║
║║║║║║║║║║ ╠╠╠╠░
╚║║║║║║║║╠ ╠╠╠╠░ ╓»»»»»»»»
╙╚║║║║╚╙ #╠╠╠╠╠∩ ▓▓▓▓▓▓▓▓▒
╔╠╠╠╠╠╠╠╠, \▓▓▓▓▓▓▓▓▓
`╠╠╠╠╠╠╠╠╠∩ #▓▓▓▓▓▓▓▓▓Ñ
╠╠╠╠╠╠╠╠╠╠ ╓@▓▓▓▓▓▓▓▓▓▓╜
╙╠╠╠╠╠╠╚ ┌▓▓₧MmmM₧▓▓▓▓▓▓▓▓▓▓▓▓▓▓
╙╠╠╠∩ ╓▓▓▓▓▓▓▓▓▓▓▓▓▓▀░ └
` #▓▓▓▓▓▓▓▓▓▓▓▓▓ ╓∩╠╠╠╠∩╔
"▀▓▓▓▓▓▓▓▓▓▓▓▓ #╠╠╠╠╠╠╠╠░
└└└└└└ ╠╠╠╠╠╠╠╠╠╠
╚╠╠╠╠╠╠╠
└╙╙╙