Wednesday, November 01, 2006

scandinavia's radar map for gnome weather applet

Here is how to download the scandinavian radar map for rain and snow from the swedish meterologic institute and put it into your gnome weather applet:

put this into your $HOME/bin
#!/bin/sh

codeblob=$(wget "https://xout.smhi.se/natvader/gateway/getmodule.php?module_request=radarsekvens_norden&images=1&user_id=21" --output-document=-)

url=$(echo $codeblob | sed -e "s/.*\(https[^\']*\).*/\1/")

wget $url --output-document=/tmp/smhi-radar.png


and this into your user's crontab:

30 */2 * * * $HOME/bin/smhi-radar.sh >/dev/null 2>&1


and this into your gnome weather applet's radar url:

file:///tmp/smhi-radar.png


Here you see the area covered:

1 Comments:

At 5:49 PM, Blogger Unknown said...

Worked like a charm! Thanks!

 

Post a Comment

<< Home