Freevo

- User Documentation

# XMLTVAustralian

### Australia

search Google for "tv_grab_au". Its not part of the xmltv package yet, but its usable and its out there.

There is an error in the listings source for Australia where xml special characters are escaped twice, so you get &amp;amp rather than &amp; . Here's a small script that grabs the listings and fixes this error.

    #!/bin/bash -x

    XMLTV_FILE="/tmp/TV.xml"
    LISTINGS_FILE=`date +"$HOME/xmltv/listings_%Y%m%d.xml"`

    tv_grab_au --output "${LISTINGS_FILE}" --days 7

    # make sure the file is larger than 4k - otherwise there was an error in the data
    if [ `ls -sk "${LISTINGS_FILE}" | awk '{print $1;}'` -gt 4 ] ; then
            # fix the double escapes
            sed -i 's/\&amp;amp;/\&amp;/g' "${LISTINGS_FILE}"
            echo Listing is good
            rm "${XMLTV_FILE}"
            ln -s "${LISTINGS_FILE}" "${XMLTV_FILE}"
    else
            echo Listing is bad
    fi

    freevo schedulefavorites

last edited 2005-01-25 12:24:06 by JohnMolohan
current version: http://freevo.sourceforge.net/cgi-bin/doc/XMLTVAustralian