乔部落格

世界上有10种人:认识二进制的和不认识二进制的

把ASCII图转成图片

joe posted @ 2010年4月24日 17:49 in 酷软技巧 with tags ditaa , 3222 阅读

原文:http://coolshell.cn/?p=1684

我们都知道有很多软件帮我们把图片转成ASCII码图,这里这个工具是帮我们把ASCII图转成漂亮的图片。这个开源的软件是一个用Java写成的一个命令行的工具。对于这个工具的目的,我个人以为如下:

  • 其一,可以把别人的ASCII图转成图片,于是更好看一些。
  • 其二,你可以使用ASCII码画图,而不需要使用图片编辑器。
  • 其三,因为是命令行,所以,你完全可以以脚本或程序的方法来作图了。

这个工具软件叫ditaa,其网址是:http://ditaa.sourceforge.net/

 

这个小工具支持一些语法定义,可以帮你更好地产生图片,如下所示:

圆角矩形

/--+
|  |
+--/
round corner demo

定义颜色

Color codes
/-------------+-------------\
|cRED RED     |cBLU BLU     |
+-------------+-------------+
|cGRE GRE     |cPNK PNK     |
+-------------+-------------+
|cBLK BLK     |cYEL YEL     |
\-------------+-------------/
color code

一些图示

名字 ASCII 图版 注释
文档
+-----+
|{d}  |
|     |
|     |
+-----+
表示文件
存储
+-----+
|{s}  |
|     |
|     |
+-----+
表示数据库或磁盘
输入
输出
+-----+
|{io} |
|     |
|     |
+-----+
输入/输出标志。

线条设置

----+  /----\  +----+
    :  |    |  :    |
    |  |    |  |{s} |
    v  \-=--+  +----+

线上的链接点

*----*
|    |      /--*
*    *      |
|    |  -*--+
*----*
point marker demo

文本

/-----------------\
| Things to do    |
| cGRE            |
| o Cut the grass |
| o Buy jam       |
| o Fix car       |
| o Make website  |
\-----------------/
bullet point demo
JAC 8th Question Pap 说:
2022年8月25日 23:03

Jharkhand Academic Council will issue Syllabus wise and Subjects wise Model Question Paper Mathematics, Science, English For the Hindi, Social subjects, Jharkhand Board Class 8th Model can Download the Question Papers. The State Of Jharkhand Academic Council JAC 8th Class Public Examination 2023, JAC 8th Question Paper 2023 Conducting April and May 2023, So Prepare Students Download JAC Board Class 8th Syllabus and Pattern 2023, Jharkhand Class 8th Model Question Paper 2023,

Things to do 说:
2024年3月21日 19:36

The travel addict inside you is craving for new adventure? things to do post will suggest you the new destination for your next journey with all the best spots around the world.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter