Changeset 18478


Ignore:
Timestamp:
Nov 7, 2012, 7:38:23 PM (13 years ago)
Author:
gost
Message:

{callmonitor] extensions for 7390 labor

Location:
ipk/source.sh4/titanswaptools_callmonitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/titanswaptools_callmonitor/CONTROL/control

    r14333 r18478  
    11Package: titan-plugin-swaptools-callmonitor
    2 Version: 1.6
     2Version: 2.0
    33Architecture: sh4
    44OE: Callmonitor
  • ipk/source.sh4/titanswaptools_callmonitor/var/swap/titanplugins/callmonitor1/fritzbox_msg_new.sh

    r18474 r18478  
    201201loadFritzBook () {
    202202 if [ $usePhoneBook = "1" ]; then
    203                 rm $FRITZBUCH
     203                #rm $FRITZBUCH
    204204                if [ ! -f $FRITZBUCH ]; then
    205205                        # Challenge abholen
     
    237237                                #testen ob neues Telefonbuch
    238238                                #$CURL --data "sid=$SID" http://$FRITZBOXIP/fon_num/fonbook_list.lua > /tmp/test.curl
    239                                 $CURL --data "sid=$SID" http://$FRITZBOXIP/fon_num/fonbook_list.lua | grep "<td class=\"tname\">" | sed s/"<td class=\"tname\">"/"\nfritztele<"/ | sed s/">"/"<"/g | sed s/"'"//g | sed s/'"'//g > /tmp/curlhelp.tmp
     239                                $CURL --data "sid=$SID" http://$FRITZBOXIP/fon_num/fonbook_list.lua | grep "<td class=\"tname\">" | sed s/"<td class=\"tname\">"/"\nfritztele<"/ | sed s/">"/"<"/g | sed s/"'"//g | sed s/'"'//g | sed s/"&amp;"/"+"/g > /tmp/curlhelp.tmp
    240240                                while read line
    241                                         do
    242                                                 art=`echo $line | cut -d'<' -f1`
    243                                                 if [ $art == "fritztele" ]; then
    244                                                         name=`echo $line | cut -d'<' -f2`
    245                                                         nummer=`echo $line | cut -d'<' -f8`
    246                                                         echo "$nummer#$name" >> $FRITZBUCH
     241                                do
     242                                        nummer1="0"
     243                                        nummer2="0"
     244                                        nummer3="0"
     245                                        pos1=14
     246                                        pos2=0
     247                                        pos3=0
     248                                        art=`echo $line | cut -d'<' -f1`
     249                                        if [ $art = "fritztele" ]; then
     250                                                name=`echo $line | cut -d'<' -f2`
     251                                                nummer1=`echo $line | cut -d'<' -f8`
     252                                                help=`echo $line | cut -d'<' -f11`
     253                                                if [ $help == "br" ]; then
     254                                                        nummer2=`echo $line | cut -d'<' -f14`
     255                                                        pos1=20
     256                                                        pos2=22
     257                                                        help=`echo $line | cut -d'<' -f17`
     258                                                        if [ $help == "br" ]; then
     259                                                                nummer3=`echo $line | cut -d'<' -f20`
     260                                                                pos1=26
     261                                                                pos2=28
     262                                                                pos3=30
     263                                                        fi
    247264                                                fi
    248                                         done < /tmp/curlhelp.tmp
     265                                                if [ $nummer1 != "0" ]; then
     266                                                        typ=`echo $line | cut -d'<' -f$pos1`
     267                                                        echo "$nummer1#$name - $typ" >> $FRITZBUCH
     268                                                fi
     269                                                if [ $nummer2 != "0" ]; then
     270                                                        typ=`echo $line | cut -d'<' -f$pos2`
     271                                                        echo "$nummer2#$name - $typ" >> $FRITZBUCH
     272                                                fi
     273                                                if [ $nummer3 != "0" ]; then
     274                                                        typ=`echo $line | cut -d'<' -f$pos3`
     275                                                        echo "$nummer3#$name - $typ" >> $FRITZBUCH
     276                                                fi
     277                                        fi
     278                                done < /tmp/curlhelp.tmp
    249279                                rm /tmp/curlhelp.tmp
    250280                        fi
Note: See TracChangeset for help on using the changeset viewer.