summaryrefslogtreecommitdiff
path: root/scripts/temperaturescript.sh
diff options
context:
space:
mode:
authorkloschi klosch <klosch@netresearch.de>2012-02-02 21:56:19 +0100
committerkloschi klosch <klosch@netresearch.de>2012-02-02 21:56:19 +0100
commit76f5eb72cda67da497ea4ba992778661559f26b4 (patch)
treeee6875ff52dfb6b09df037095e254c6f8a8fc531 /scripts/temperaturescript.sh
parent343edab3eb5284dd0ec236883974f16b486e6e3b (diff)
parent002ccb53e6319619d503972c2a6bad0d4ead0c6f (diff)
Merge branch 'master' of sublab.org:website
Conflicts: public/img/onewire/digitemp.jpg template/news/2011-12-07-frieren.html template/pages/projekte/content.html template/pages/verein/content.html template/pages/vokue/content.html template/template/template.html template/topic/topic
Diffstat (limited to 'scripts/temperaturescript.sh')
-rwxr-xr-xscripts/temperaturescript.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/temperaturescript.sh b/scripts/temperaturescript.sh
new file mode 100755
index 0000000..df13b38
--- /dev/null
+++ b/scripts/temperaturescript.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+#script to fetch latest temperature graph and resize it.
+
+
+URL="http://taifun.local.sublab.org/temperature/temp-2hour.png"
+WEBPATH=../
+
+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 -contrast-stretch 0 -resize 200x50 -contrast-stretch 0 ${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
+
+
+
+