← 返回命令列表

Linux command

ditaa 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert ASCII art to PNG image

ditaa [input.txt] [output.png]

Convert with antialiasing disabled

ditaa -A [input.txt] [output.png]

Convert without shadows

ditaa -S [input.txt] [output.png]

Convert with rounded corners

ditaa -r [input.txt] [output.png]

Scale output image

ditaa -s [2.0] [input.txt] [output.png]

Output as SVG

ditaa --svg [input.txt] [output.svg]

Convert with transparent background

ditaa -T [input.txt] [output.png]

说明

ditaa (DIagrams Through ASCII Art) converts ASCII art diagrams into proper graphics. It recognizes boxes, lines, and basic shapes drawn with ASCII characters and renders them as bitmap or vector images. Input uses standard ASCII characters: +, -, | for box corners and edges, / and \\ for diagonals, = for dashed lines, and text inside boxes for labels. Color tags like {c:red} customize appearance. The tool is useful for documentation, where diagrams can be kept as ASCII in source files (version-controllable, editable) and rendered to images for publication.

参数

-A, --no-antialias
Disable antialiasing.
-S, --no-shadows
Disable drop shadows.
-r, --round-corners
Use rounded corners for boxes.
-s, --scale _factor_
Scale output by factor.
-T, --transparent
Use transparent background.
-E, --no-separation
Disable shape edge separation.
-e, --encoding _enc_
Input file encoding.
--svg
Output as SVG instead of PNG.
-t, --tabs _n_
Tab size for input.
-v, --verbose
Verbose output.

FAQ

What is the ditaa command used for?

ditaa (DIagrams Through ASCII Art) converts ASCII art diagrams into proper graphics. It recognizes boxes, lines, and basic shapes drawn with ASCII characters and renders them as bitmap or vector images. Input uses standard ASCII characters: +, -, | for box corners and edges, / and \\ for diagonals, = for dashed lines, and text inside boxes for labels. Color tags like {c:red} customize appearance. The tool is useful for documentation, where diagrams can be kept as ASCII in source files (version-controllable, editable) and rendered to images for publication.

How do I run a basic ditaa example?

Run `ditaa [input.txt] [output.png]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -A, --no-antialias do in ditaa?

Disable antialiasing.