summaryrefslogtreecommitdiff
path: root/PLUGINS/epgdata/scripts/getepgdataids
blob: 898a6473a1b319892078cd434ae5615db6bc34be (plain)
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

path="/tmp/epgdata/"
file=$path/"info.zip"

mkdir -p $path

cd $path
rm -f *

wget "http://www.epgdata.com/index.php?action=sendInclude&iOEM=&pin=XYZ&dataType=xml" -q -O $file

unzip $file > /dev/null 2>&1
rm $file

chanfile="channel_y.xml"

cat $chanfile | while read line; do 

   if [[ ${line} =~ "<ch0>" ]]; then

     chan=${line#*>}
     chan=${chan%<*}

   else 

     if [[ ${line} =~ "<ch4>" ]]; then

       id=${line#*>}
       id=${id%<*}

       echo "epgdata:$id    // $chan"

     fi

   fi  

done | sort