Skip to content

Instantly share code, notes, and snippets.

@packmad
Created September 29, 2020 11:10
Show Gist options
  • Save packmad/81167d924ef328a39e618134809c7b80 to your computer and use it in GitHub Desktop.
Save packmad/81167d924ef328a39e618134809c7b80 to your computer and use it in GitHub Desktop.
Plots all Graphviz layouts
#!/bin/bash
# /usr/sbin/libgvc6-config-update
# Use one of: circo dot fdp neato osage patchwork sfdp twopi
declare -a graphviz=("circo" "dot" "fdp" "neato" "osage" "patchwork" "sfdp" "twopi")
if [ -f "$1" ]; then
pardir="$(dirname "$1")"
bname="$(basename "$1")"
for i in "${graphviz[@]}"
do
eval $i -Tpdf $1 -o "$pardir/$bname"_$i.pdf
done
else
echo "Usage: plothemall.sh <filename>.dot"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment