aboutsummaryrefslogtreecommitdiff
path: root/zsh/functions/graphviz.zsh
blob: f62f9b25fcb6db9d661df854a9b7f85bc1883e31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Graphviz functions
dot-to-png () {
  if [[ -n "${1+x}" ]]; then
    dot -Tpng $1 -o ${1%.*}.png
  else
    echo 'Usage: dot-to-png <path_to_file>'
  fi
}

neat-to-png () {
  if [[ -n "${1+x}" ]]; then
    neato -Tpng $1 -o ${1%.*}.png
  else
    echo 'Usage: neat-to-png <path_to_file>'
  fi
}

seqdiag-to-png () {
  if [[ -n "${1+x}" ]]; then
    seqdiag -o ${1%.*}.png -f /System/Library/Fonts/SFNSText.ttf $1
  else
    echo 'Usage: seqdiag-to-png <path_to_file>'
  fi
}