Source: https://gist.github.com/timabell/da08616ecb8693d524b8eab3b7b51018
License: MIT
| out.svg |
Source: https://gist.github.com/timabell/da08616ecb8693d524b8eab3b7b51018
License: MIT
| sudo apt install graphviz entr |
| digraph { | |
| a -> b | |
| a -> c | |
| b -> d | |
| c -> d | |
| } | |
| <html> | |
| <head> | |
| <!-- https://stackoverflow.com/questions/1346716/how-do-i-make-firefox-auto-refresh-on-file-change/6385846#6385846 --> | |
| <script type="text/javascript" src="http://livejs.com/live.js"></script> | |
| </head> | |
| <body> | |
| <img src="out.svg"/> | |
| </body> | |
| </html> |
| #!/bin/bash | |
| file=${1:-graph.gv} | |
| echo "showing rendering of $file" | |
| dot -Tsvg "$file" > out.svg && xdg-open out.svg |
| #!/bin/sh -v | |
| ./update.sh "$1" | |
| ./watch.sh "$1" & | |
| xdg-open http://localhost:8000/live-graph.html & | |
| python -m SimpleHTTPServer | |
| wait |
| #!/bin/bash | |
| file=${1:-graph.gv} | |
| echo "updating rendering of $file" | |
| date | |
| dot -Tsvg "$file" > out.svg | |
| touch live-graph.html # to trigger live.js | |
| echo updated |
| #!/bin/bash | |
| # https://github.com/guard/guard/wiki/Guard-alternatives | |
| # http://eradman.com/entrproject/ | |
| file=${1:-graph.gv} | |
| echo "watching $file" | |
| echo "$file" | entr ./update.sh "$1" |