summaryrefslogtreecommitdiff
path: root/plugins/weatherng
diff options
context:
space:
mode:
authorroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
committerroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
commit0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch)
tree11517ce0d3d2977c6732b3aa583b0008083e0bd3 /plugins/weatherng
downloadx-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz
x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2
hello world
Diffstat (limited to 'plugins/weatherng')
-rw-r--r--plugins/weatherng/patches/weatherng-0.0.10-gcc43.diff36
-rw-r--r--plugins/weatherng/plugin.sh72
-rw-r--r--plugins/weatherng/weatherng.sh76
3 files changed, 184 insertions, 0 deletions
diff --git a/plugins/weatherng/patches/weatherng-0.0.10-gcc43.diff b/plugins/weatherng/patches/weatherng-0.0.10-gcc43.diff
new file mode 100644
index 0000000..043c1ec
--- /dev/null
+++ b/plugins/weatherng/patches/weatherng-0.0.10-gcc43.diff
@@ -0,0 +1,36 @@
+--- imagecache.h.orig 2008-12-20 18:02:29.000000000 +0100
++++ imagecache.h 2008-12-20 18:07:46.000000000 +0100
+@@ -19,21 +19,21 @@
+
+ item_map mItems;
+ usage_list mUsage;
+- uint mMaxItems;
++ unsigned int mMaxItems;
+
+ protected:
+ virtual void DeleteObject(const key_type &Key, data_type &Data) = 0;
+ virtual void ResetObject(data_type &Data) = 0;
+
+ public:
+- cxCache(uint MaxItems);
++ cxCache(unsigned int MaxItems);
+ virtual ~cxCache();
+
+ void Reset(void);
+ void Flush(void);
+ bool Contains(const key_type &Key);
+ data_type &operator[](const key_type &Key);
+- uint Count(void) { return mUsage.size(); }
++ unsigned int Count(void) { return mUsage.size(); }
+ };
+
+ template<class key_type, class data_type>
+@@ -43,7 +43,7 @@
+ }
+
+ template<class key_type, class data_type>
+-cxCache<key_type, data_type>::cxCache(uint MaxItems)
++cxCache<key_type, data_type>::cxCache(unsigned int MaxItems)
+ {
+ mMaxItems = MaxItems;
+ }
diff --git a/plugins/weatherng/plugin.sh b/plugins/weatherng/plugin.sh
new file mode 100644
index 0000000..a94f434
--- /dev/null
+++ b/plugins/weatherng/plugin.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis)
+# von Marc Wernecke - www.zulu-entertainment.de
+# 21.05.2008
+#
+# vdr-weatherng
+
+# defaults
+source ./../../x-vdr.conf
+source ./../../setup.conf
+source ./../../functions
+
+WEB="http://vdr.glaserei-franz.de/files/vdr-weatherng-0.0.10.tar.bz2"
+VERSION="weatherng-0.0.10"
+LINK="weatherng"
+
+VAR=`basename $WEB`
+DIR=`pwd`
+
+# plugin entfernen
+function clean_plugin() {
+ cd $SOURCEDIR/VDR/PLUGINS/src
+ rm -rf $LINK*
+ rm -f $VDRLIBDIR/libvdr-$LINK*
+ rm -rf $VDRCONFDIR/plugins/weatherng
+ rm -f $VDRSCRIPTDIR/weatherng.sh
+ log "cleaning $LINK"
+}
+
+# plugin installieren
+function install_plugin() {
+ download_plugin
+ extract_plugin
+ cd $SOURCEDIR/VDR/PLUGINS/src
+ rm -f $LINK
+ ln -vfs $VERSION $LINK
+ patch_plugin
+
+ ## plugin specials - start ##
+
+ # config kopieren
+ if [ -d $DIR/images ]; then
+ cp -fR $DIR/weatherng $VDRCONFDIR/plugins
+ else
+ cp -fR $SOURCEDIR/VDR/PLUGINS/src/$LINK/weatherng/weatherng $VDRCONFDIR/plugins/weatherng
+ fi
+
+ # script kopieren
+ if [ -f $DIR/weatherng.sh ]; then
+ cp -f $DIR/weatherng.sh $VDRSCRIPTDIR
+ else
+ cp -f $SOURCEDIR/VDR/PLUGINS/src/$LINK/examples/weatherng.sh $VDRSCRIPTDIR
+ fi
+
+ # rechte setzen
+ chown -R $VDRUSER:$VDRGROUP $VDRCONFDIR/plugins/weatherng
+ chown $VDRUSER:$VDRGROUP $VDRSCRIPTDIR/weatherng.sh
+ chmod 0744 $VDRSCRIPTDIR/weatherng.sh
+ ## plugin specials - ende ##
+}
+
+# plugin commands
+if [ $# \> 0 ]; then
+ cmd=$1
+ cmd_plugin
+else
+ install_plugin
+ log "install-plugin fuer $VERSION ist fertig"
+fi
+
+exit 0
diff --git a/plugins/weatherng/weatherng.sh b/plugins/weatherng/weatherng.sh
new file mode 100644
index 0000000..5127206
--- /dev/null
+++ b/plugins/weatherng/weatherng.sh
@@ -0,0 +1,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