summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@vdr02.(none)>2009-02-28 15:32:15 (GMT)
committerroot <root@vdr02.(none)>2009-02-28 15:32:15 (GMT)
commit7bb4e7cf5723c183193becebfd97517a7d12a9a9 (patch)
tree5e0002b1392b1b8f1c81fc5e1353336ae258d501
parent58f64a66a90bb2eb74fcdef0c08f77bed6f62e7e (diff)
downloadvdr-channels-7bb4e7cf5723c183193becebfd97517a7d12a9a9.tar.gz
vdr-channels-7bb4e7cf5723c183193becebfd97517a7d12a9a9.tar.bz2
Initial Revision
-rwxr-xr-xget_chconf_pkg.sh83
1 files changed, 83 insertions, 0 deletions
diff --git a/get_chconf_pkg.sh b/get_chconf_pkg.sh
new file mode 100755
index 0000000..a8b10f4
--- /dev/null
+++ b/get_chconf_pkg.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+#
+# Scipt to fetch all channels.conf from VDR-Wiki and from LinowSat
+# Written by Helmut Auer 2009
+#
+VDR_WIKI_URL="http://www.vdr-wiki.de"
+LINOWSAT_URL="http://www.linowsat.de/settings/vdr"
+# recode Filter - set to "" if not needed or recode is not available
+RECODE="recode utf-8..latin1"
+
+function conv_chan() {
+ FOUND=0
+ NAME="channels.conf.$1"
+ [ -f "channels.conf.$NAME" ]&& rm "channels.conf.$NAME"
+ echo "Checking $1 ..."
+
+ if [ "$RECODE" != "" ] ; then
+ CCN="$1.rec"
+ cat "$1" | $RECODE > $CCN
+ rm "$1"
+ else
+ CCN="$1"
+ fi
+ cat "$CCN" | while read i ; do
+ if [ "$FOUND" = "0" ] ; then
+ if [ "${i/h1 class=/}" != "$i" ] ; then
+ NAME="${i#*>}"
+ NAME=${NAME%<*}
+ NAME=${NAME#* }
+ NAME=${NAME// /-}
+ NAME="${NAME//\//-}"
+ NAME="${NAME///ae}"
+ NAME="${NAME///oe}"
+ NAME="$(echo "${NAME///ue}" |sed -e "s/[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\-]/_/g")"
+ [ -f "channels.conf.$NAME" ]&& rm "channels.conf.$NAME"
+ fi
+ if [ "${i/<pre>/}" != "$i" ] ; then
+ FOUND=1
+ i=${i#*<pre>}
+ fi
+ fi
+ if [ "$FOUND" = "1" ] ; then
+ if [ "${i/<\/pre>/}" != "$i" ] ; then
+ FOUND=0
+ i=${i%</pre>*}
+ fi
+ if [ "${i// /}" != "" ] ; then
+ ln=${i//&amp;/&}
+ ln=${ln//&nbsp;/ }
+ echo "$ln" >> "channels.conf.$NAME"
+ fi
+ [ "$FOUND" = "0" ] && break
+ fi
+ done
+ rm "$CCN"
+}
+
+if [ "$1" != "" ] ; then
+ echo "Syntax: $0"
+ echo " $0 will fetch all channellists from vdr-wiki and some from linowsat"
+ echo " and pu these into the current directory"
+ exit
+fi
+
+# get channels.conf from vdr-wiki
+for i in S C T ; do
+ wget -O - "$VDR_WIKI_URL/wiki/index.php/DVB-${i}_channels.conf" 2>/dev/null | grep "Channels.conf.DVB${i}" | sed -e "s#a href=\"/wiki#a\nhref=\"/wiki#g" | grep "php/Channels.conf.DVB${i}" | cut -f 2,4 -d '"' | grep -v "TEMPLATE" | while read chan ; do
+ LNK="$VDR_WIKI_URL/${chan%\"*}"
+ NAME="${chan#*\"}"
+ NAME="${NAME//\//-}"
+ CC="channels.conf.html.${NAME#Channels.conf }"
+ wget -O - "$LNK" 2>/dev/null > "$CC"
+ conv_chan "$CC"
+ done
+done
+# get channels.conf from linowsat
+
+wget -O channels.conf.DVBS-S19.2-Astra-FTA-Linowsat "$LINOWSAT_URL/0192/fta/channels.conf"
+wget -O channels.conf.DVBS-S19.2-Astra-All-Linowsat "$LINOWSAT_URL/0192/ca/channels.conf"
+wget -O channels.conf.DVBS-S19.2S13-Astra-Hotbird-FTA-Linowsat "$LINOWSAT_URL/01300192/fta/channels.conf"
+wget -O channels.conf.DVBS-S19.2S13-Astra-Hotbird-All-Linowsat "$LINOWSAT_URL/01300192/ca/channels.conf"
+wget -O channels.conf.DVBS-S19.2S13S28-Astra12-Hotbird-FTA-Linowsat "$LINOWSAT_URL/013001920282/fta/channels.conf"
+wget -O channels.conf.DVBS-S19.2S13S28-Astra12-Hotbird-All-Linowsat "$LINOWSAT_URL/013001920282/ca/channels.conf"