aboutsummaryrefslogtreecommitdiff
path: root/zsh/functions/graphviz.zsh
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2020-02-16 14:40:26 +0100
committerBen Beltran <ben@nsovocal.com>2020-02-16 14:40:26 +0100
commitfa25023586cb94a1abf4fd3ff95ebe7c3c8ead09 (patch)
tree87404d2a291facd6d7fd567fe251bc1c12f688c8 /zsh/functions/graphviz.zsh
parentf6272d88eae76c8553f237f3f318c4a97997f262 (diff)
Remove prezto
Diffstat (limited to 'zsh/functions/graphviz.zsh')
-rw-r--r--zsh/functions/graphviz.zsh24
1 files changed, 24 insertions, 0 deletions
diff --git a/zsh/functions/graphviz.zsh b/zsh/functions/graphviz.zsh
new file mode 100644
index 0000000..d7b4e12
--- /dev/null
+++ b/zsh/functions/graphviz.zsh
@@ -0,0 +1,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: dot-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
+}