1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
#!/bin/sh
#
# weatherng.sh
#
# source: vdr-plugin weatherng
#
# To use this examples of urls , you must have the permission of owner to download and
# use them. Otherwise you must change the URLs. See README or README.DE.
# Change SETUPDIR if you need.
. /etc/default/vdr
SETUPDIR=$VDRCONFDIR
LANGUAGE=( `grep -s ^OSDLanguage.*[0-9]$ "$SETUPDIR/setup.conf"` )
case "${LANGUAGE[2]}" in
1) MESG='Download abgeschlossen und Radarmaps aktualisiert'
URLS=(\
# http://www.dwd.de/scripts/getimg.php?src=/wundk/Wetter.jpg \
# http://www.zdf.de/ZDFde/wetter/showpicture/0,2236,355,00.jpg \
# http://www.zdf.de/ZDFde/wetter/showpicture/0,2236,110,00.jpg \
# http://www.zdf.de/ZDFde/wetter/showpicture/0,2236,267,00.jpg \
# http://www.zdf.de/ZDFde/wetter/showpicture/0,2236,346,00.jpg \
)
;;
7) MESG='Téléchargement des données Météo OK'
URLS=(\
# http://meteo.france3.fr/img/f3-france-512x384-j0pm.jpg \
# http://meteo.france3.fr/img/f3-ouest-512x384-j0pm.jpg \
# http://meteo.france3.fr/img/f3-ouest-512x384-j1am.jpg \
# http://meteo.france3.fr/img/f3-ouest-512x384-j1pm.jpg \
# http://meteo.france3.fr/img/f3-ouest-512x384-j2am.jpg \
)
;;
8) MESG='Sääkuvat päivitetty'
URLS=(\
# http://weather.fmi.fi/yle/suomineito_1.gif \
# http://www.yle.fi/saakartat/image1.jpg \
# http://www.yle.fi/saakartat/isokartta.jpg \
# http://www.yle.fi/saakartat/imgday1.jpg \
# http://www.yle.fi/saakartat/imgday2.jpg \
)
;;
*) MESG='Weather pictures updated'
URLS=(\
"" \
"" \
"" \
"" \
"" \
)
;;
esac
if ping -c2 83.97.42.2 > /dev/null ; then
for i in $(seq 0 10) ; do
eval ${URLS[$i]:+ wget -t 4 -T 20 "${URLS[$i]}" -O "$SETUPDIR/plugins/weatherng/pic${i}"}
done
# Dont change or uncomment this and the following 5 lines. ;)
# Uncomment download only if you have a permission from The Weather Channel (see README).
# otherwise get one ;) and do whatever you want.
# !!!! DONT FORGET TO CHANE YOUR STATIONIDs !!!!!! (See README or README.DE how to get them.
# Example for Herne,Germany [GMXX0057]with a permission from The weather channel:
# e.g : wget -t 4 -T 20 "http://xoap.weather.com/weather/local/GMXX0057?cc=*&unit=m&dayf=10&prod=xoap&par=1004124588&key=079f24145f208494" -O "$SETUPDIR/plugins/weatherng/data1.xml"
# wget -t 4 -T 20 "http://xoap.weather.com/weather/local/GMXX0242?cc=*&unit=m&dayf=10&prod=xoap&par=1004124588&key=079f24145f208494" -O "$SETUPDIR/plugins/weatherng/data1.xml" # Bielefeld-Windelsbleiche
# wget -t 4 -T 20 "http://xoap.weather.com/weather/local/GMXX0049?cc=*&unit=m&dayf=10&prod=xoap&par=1004124588&key=079f24145f208494" -O "$SETUPDIR/plugins/weatherng/data2.xml" # Hamburg
# wget -t 4 -T 20 "http://xoap.weather.com/weather/local/GMXX0007?cc=*&unit=m&dayf=10&prod=xoap&par=1004124588&key=079f24145f208494" -O "$SETUPDIR/plugins/weatherng/data3.xml" # Berlin
fi
echo $MESG
|