2019-02-22 14:16:21 -05:00
|
|
|
# Produces a GraphViz Dot file from the data in the contributors.json file.
|
|
|
|
# Documentation for this syntax at https://stedolan.github.io/jq/manual
|
2019-03-29 08:25:51 -04:00
|
|
|
to_entries
|
2019-04-10 19:06:22 -04:00
|
|
|
| map(select(
|
|
|
|
(.value.groups | index("Angular")) or
|
|
|
|
(.value.groups | index("Collaborators"))))
|
|
|
|
| map(.value |= {
|
|
|
|
name: .name,
|
|
|
|
lead: (.lead // .mentor // ""),
|
|
|
|
fillcolor: (if .groups | index("Collaborators") then "aquamarine" else "beige" end),
|
|
|
|
})
|
2019-02-22 14:16:21 -05:00
|
|
|
| map(
|
2019-04-10 19:06:22 -04:00
|
|
|
"\(.key|tojson) [ label=\(.value.name|tojson) fillcolor=\(.value.fillcolor|tojson) style=filled ] ",
|
|
|
|
(if .value.lead != "" then "\(.key|tojson) -> \(.value.lead|tojson)" else "" end)
|
2019-02-22 14:16:21 -05:00
|
|
|
)
|
|
|
|
[]
|
|
|
|
|