arblang 0.1.2

Visualize and modify Unix pipelines: pipe a stream in, arb spawns a dynamic TUI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
# kustomize — resource kind/apiVersion dashboard from kustomize build YAML
#   kustomize build overlays/prod | arb -p kustomize
bars .kinds
source .kinds { in; match /^kind:/; field 2; tally }
bars .apiversions
source .apiversions { in; match /^apiVersion:/; field 2; tally }
tail .names
source .names { in; match /^  name:/; field 2 }

test "kind tally" { given "apiVersion: apps/v1" "kind: Deployment" "  name: web" "apiVersion: v1" "kind: Service" "  name: websvc"; run { in; match /^kind:/; field 2; tally }; want "Deployment\t1" "Service\t1" }
test "apiversion tally" { given "apiVersion: apps/v1" "kind: Deployment" "  name: web" "apiVersion: v1" "kind: Service" "  name: websvc"; run { in; match /^apiVersion:/; field 2; tally }; want "apps/v1\t1" "v1\t1" }
test "resource names" { given "apiVersion: apps/v1" "kind: Deployment" "  name: web" "apiVersion: v1" "kind: Service" "  name: websvc"; run { in; match /^  name:/; field 2 }; want "web" "websvc" }