aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 913466885f367e0c94b3b8b14392c78deaebf033 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Map

A wardley mapping tool: Write some text, get a diagram

## Building

Open the project in Xcode and press the run button (or `make build`)

## Testing

Open the project in Xcode and press the test button (or `make test`)

## Formatting and Linting

In order to format and lint the code, the project provides a Makefile that
uses [swift-format][swift-format].

* To format: `make format`
* To lint: `make lint`

These commands run on every `.swift` file in the directory.

## Language Reference

### Nodes

Nodes should be of the format `Name (x,y)`. The name can contain spaces, and
the `x`/`y` can be integers or decimals. All dimensions go from 0 - 100, so
50 means 50% of the way through. eg.

- `Node (1,2)`
- `My Cool Node (1.0,2.0)`
- `A (1, 2.0)`

### Edges

Edges connect two nodes. They use the format `Node -- Node` (line only) or
`Node -> Node` (with arrowhead). eg.

- `Node -- My Cool Node`
- `A -> Node`

### Blockers

You can place a blocker in front of a node by using `[Blocker] Node`. eg.

- `[Blocker] My Cool Node`
- `[Blocker] A`

### Evolution

You can draw evolution arrows by using `[Evolution] Node +x` or
`[Evolution] Node -x`. eg.

- `[Evolution] My Cool Node -10`
- `[Evolution] A +15`

### Modifying the axes

If you need more space for one of the four segments you can use
`[I] x`, `[II] x`, or `[III] x`. eg.

- `[I] 15`
- `[II] 35.5`
- `[III] 80`

The parser doesn't enforce position, so if you put axis iii before axis i,
you'll get some rendering issues.

### Groups

You can group nodes together by using `[Group] NodeA, NodeB...`. eg.

- `[Group] Tinker, Tailor, Soldier`
- `[Group] Two Words, Three Words Here`

### Notes

You can add notes `[Note] (x, y) Text` where x and y are numbers, and Text is
any text with spaces or `\n`.

- `[Note] (30, 45) Here we want to call out an explanation or context.`
- `[Note] (90, 25) We're close to the edge \n so we can multiline it.`

[swift-format]: https://github.com/apple/swift-format.git