dihaa

Safe HaskellNone
LanguageHaskell2010

Main

Description

dihaa

Convert simple ASCII art diagrams to nice images.

Usage:

 Usage: dihaa [OPTION...] files...
   -p  --png   Output as PNG file.
   -u  --utf8  Output as UTF-8 to stdout.

Drawing

The input file(s) can contain certain “graphical” ASCII art elements, which will be converted to real graphics by dihaa. Everything else wil just be rendered as plain text.

The recognised ASCII art elements are:

Boxes can be drawn using | and - with + as corners:

 +-------+
 | A box |
 +-------+

generates:

Lines can be drawn with the same characters, where + can be used for corners, tees and crossings:

 --- | ---+     --+--    |
     |    |       |    --+--
     |    +-------+      |

generates:

Using <, >, ^ and v as heads, lines become Arrows:

 --> ^ ---+     <-+->    ^
     |    |       |    <-+->
     |    +-------+      v

generates:

Styles

To create colored boxes you may put a special string `:#RGB` with RGB being three single digit hexadezimal numbers into a box, like so:

  +----------------------+
  |:#fe8                 |
  | Nice warm yellow box |
  |                      |
  +----------------------+

generates:

Example:

The input

 Example 1
                                    
 +----------------------+           
 | This is a simple box +----+---- + Color Code ":#0f0"
 +----------------------+    |      
                             |      
                             v      
                       +-----------+
                       |:#0f0      |
                       | Green Box |
                       |           |
                       +-----------+

produces this image (using the -p option):

Documentation

data Options Source #

Constructors

Options 

Fields

Instances

main :: IO () Source #