Created
November 10, 2022 22:12
-
-
Save P1n3appl3/1fef03a31b6e1315538a7dbc7a552cbb to your computer and use it in GitHub Desktop.
bazel graphviz terminal pretty printer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# example usage: | |
# fx bazel cquery "allpaths(//build/bazel/examples/hello_rust:pkg.component, //build/bazel/examples/hello_rust:src/main.rs)" --output=graph | idot | |
font=mono | |
fgcolor=gray87 # closest to #DDDDDD which kitty's default foreground | |
dot -Tsvg -Nstyle=rounded -Gbgcolor=black -Ncolor=$fgcolor -Nfontcolor=$fgcolor \ | |
-Ecolor=$fgcolor -Efontcolor=$fgcolor -Gfontname=$font -Nfontname=$font -Efontname=$font | | |
tee /tmp/graph.svg | | |
kitty +kitten icat --align left # replace with some sort of sixel image output if not using kitty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment