From 7adbb4c5a8cbc99c8ee1ed2cb9b83c185fdc964f Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 14 Dec 2011 19:42:31 +0100 Subject: added script for fetching and resizing tempgraphs --- scripts/temperaturescript.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/temperaturescript.sh (limited to 'scripts/temperaturescript.sh') 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 + + + + -- cgit v1.2.1 From d586a40ecabf96d5845b1c1b93f3d559d81176c4 Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 14 Dec 2011 19:48:57 +0100 Subject: fixed bug in tempscript --- scripts/temperaturescript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 scripts/temperaturescript.sh (limited to 'scripts/temperaturescript.sh') diff --git a/scripts/temperaturescript.sh b/scripts/temperaturescript.sh old mode 100644 new mode 100755 index 1e38473..9112e87 --- a/scripts/temperaturescript.sh +++ b/scripts/temperaturescript.sh @@ -1,9 +1,9 @@ #/bin/bash #script to fetch latest temperature graph and resize it. -. settings URL="http://taifun.local.sublab.org/temperature/temp-2hour.png" +WEBPATH=../ wget ${URL} -O ${WEBPATH}/public/img/buffer.tempgraph.png &> /dev/null || exit 1 -- cgit v1.2.1 From 35356da75a72a1a44f7485fe4ed8e628027d7731 Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 14 Dec 2011 19:57:38 +0100 Subject: more contrast for tempgraphs --- scripts/temperaturescript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/temperaturescript.sh') diff --git a/scripts/temperaturescript.sh b/scripts/temperaturescript.sh index 9112e87..4186b27 100755 --- a/scripts/temperaturescript.sh +++ b/scripts/temperaturescript.sh @@ -9,7 +9,7 @@ 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 +mogrify -crop 800x400+70+41 -resize 200x50 -contrast ${WEBPATH}/public/img/buffer.thumb.tempgraph.png mv -f ${WEBPATH}/public/img/buffer.tempgraph.png ${WEBPATH}/public/img/tempgraph.png &> /dev/null -- cgit v1.2.1 From ff5ae88a5c36d67fd28aae6a9a75ba549be8a120 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Wed, 14 Dec 2011 23:21:11 +0100 Subject: Fix temperaturescript --- scripts/temperaturescript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/temperaturescript.sh') diff --git a/scripts/temperaturescript.sh b/scripts/temperaturescript.sh index 4186b27..49f24a1 100755 --- a/scripts/temperaturescript.sh +++ b/scripts/temperaturescript.sh @@ -1,4 +1,4 @@ -#/bin/bash +#!/bin/bash #script to fetch latest temperature graph and resize it. -- cgit v1.2.1 From c63516a553397f550cefa85784387085c527ec24 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 15 Dec 2011 00:59:00 +0100 Subject: contrast stretch added for tempgraphthumb --- scripts/temperaturescript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/temperaturescript.sh') diff --git a/scripts/temperaturescript.sh b/scripts/temperaturescript.sh index 49f24a1..df13b38 100755 --- a/scripts/temperaturescript.sh +++ b/scripts/temperaturescript.sh @@ -9,7 +9,7 @@ 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 -contrast ${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 -- cgit v1.2.1