summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFlorian <florianraemisch@web.de>2011-12-14 19:42:31 +0100
committerChristian Franke <nobody@nowhere.ws>2012-01-12 11:59:27 +0100
commit7adbb4c5a8cbc99c8ee1ed2cb9b83c185fdc964f (patch)
treebd552d44e1ce5af47a3223d8d1178a5391a496d7 /scripts
parentf9e6b76c6a85f089c0fa9c5d9c33eeb5ecee4a22 (diff)
added script for fetching and resizing tempgraphs
Diffstat (limited to 'scripts')
-rw-r--r--scripts/temperaturescript.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/temperaturescript.sh b/scripts/temperaturescript.sh
new file mode 100644
index 0000000..1e38473
--- /dev/null
+++ b/scripts/temperaturescript.sh
@@ -0,0 +1,20 @@
+#/bin/bash
+#script to fetch latest temperature graph and resize it.
+
+. settings
+
+URL="http://taifun.local.sublab.org/temperature/temp-2hour.png"
+
+wget ${URL} -O ${WEBPATH}/public/img/buffer.tempgraph.png &> /dev/null || exit 1
+
+cp ${WEBPATH}/public/img/buffer.tempgraph.png ${WEBPATH}/public/img/buffer.thumb.tempgraph.png
+
+mogrify -crop 800x400+70+41 -resize 200x50 ${WEBPATH}/public/img/buffer.thumb.tempgraph.png
+
+mv -f ${WEBPATH}/public/img/buffer.tempgraph.png ${WEBPATH}/public/img/tempgraph.png &> /dev/null
+
+mv -f ${WEBPATH}/public/img/buffer.thumb.tempgraph.png ${WEBPATH}/public/img/thumb.tempgraph.png &> /dev/null
+
+
+
+