Blame


1 cc9bbf61 2020-04-01 op BEGIN { print "digraph map {"; }
2 cc9bbf61 2020-04-01 op /^. / { output_edge(); location = destination = ""; }
3 cc9bbf61 2020-04-01 op $1 == "location" { location = $2; }
4 cc9bbf61 2020-04-01 op $1 == "destination" { destination = $2; }
5 cc9bbf61 2020-04-01 op $1 == "prospect" { prospect = $2; }
6 cc9bbf61 2020-04-01 op END { output_edge(); print "}"; }
7 cc9bbf61 2020-04-01 op
8 cc9bbf61 2020-04-01 op function output_edge() {
9 cc9bbf61 2020-04-01 op if (location && destination)
10 cc9bbf61 2020-04-01 op print "\t" location " -> " destination;
11 cc9bbf61 2020-04-01 op if (location && prospect)
12 cc9bbf61 2020-04-01 op print "\t" location " -> " prospect " [style=dashed]";
13 cc9bbf61 2020-04-01 op }