Created
January 17, 2013 13:51
-
-
Save teabot/4556023 to your computer and use it in GitHub Desktop.
A simple script for extracting some DOT from a wiki page and rendering as a PNG.
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 | |
curl -s "http://mywiki.me/wiki/DataFlow" > dataflow_page.html | |
awk '/# BEGIN/,/# END/{if(!/pattern/)print}' dataflow_page.html | \ | |
awk '{gsub(">", ">", $0);print}' | \ | |
awk '{gsub(""", "\"", $0);print}' | \ | |
awk '{gsub("<", "<", $0);print}' > dataflow.dot | |
EPOCH=`date +"%s"` | |
dot -Tpng dataflow.dot -o dataflow-${EPOCH}.png | |
gimp dataflow-${EPOCH}.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment