1
1
mirror of https://github.com/wader/fq.git synced 2024-11-24 03:05:22 +03:00

Merge pull request #80 from wader/doc-formats-graph

doc: Improve formats graph a bit
This commit is contained in:
Mattias Wadman 2022-01-16 21:17:50 +01:00 committed by GitHub
commit cc79735817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 823 additions and 832 deletions

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -11,23 +11,19 @@ def _formats_dot:
] | flatten | join("");
( "# ... | dot -Tsvg -o formats.svg"
, "digraph formats {"
, " concentrate=True"
, " rankdir=TB"
, " graph ["
, " ]"
, " node [shape=\"none\"style=\"\"]"
, " edge [arrowsize=\"0.7\"]"
, " node [shape=\"none\" style=\"\"]"
, ( .[]
| . as $f
| .dependencies
| flatten?
| .[]
| " \"\($f.name)\":\(.) -> \(.)"
| " \"\($f.name)\":\(.):e -> \(.):n"
)
, ( .[]
| .name as $name
| .groups[]?
| " \(.) -> \"\($name)\":\($name)"
| " \(.) -> \"\($name)\":\($name):n"
)
, ( to_entries[]
| " \(.key) [color=\"paleturquoise\", label=\(_record(.key; (.value.dependencies // [])))]"