Rob Davis wrote:

It appears that tv_grab_uk_rt went dodgy over the weekend, which happened to be when I moved from Mandrake to Gentoo..

Anyway, in search of something that downloads the listings in less than three days, I came across a posting (I think in mythtv) for getting xmltv listngs from bleb.

This, I have enclosed as an attachment..

However, the autogenerated xml output is missing the timezone information...

Specifically " +0000" at the end of each time, and is so thrown away by the epgxmltv generator..

I did a search and replace using emacs and it all loaded rather well, not to mention that it takes about 15 seconds to download a weeks listings.

Anyone feel up to doing a perl script or similar to get this working as a correct format xmltv script for freevo. It appears to go into mythtv perfectly.

Mind you, who knows what will happen in a couple of weeks when we go to BST.. I would expect bleb to ignore it.. Which means that the perl script should probably be intelligent enough to cope.


Okay, for the archives, this works...
#!/bin/bash
# Get yesterday's, today's and tomorrow's listings in XMLTV format
#
BASE_URL='http://bleb.org/tv/data/listings'
DAYS=-1,0,1,2,3,4,5,6
FORMAT=XMLTV
FILE=BZIP2
CHANNELS=bbc1,bbc2,itv1,ch4,five,sky_one,uk_history,uk_horizons,e4,itv2,cartoon_network,uk_gold,bbc_radio4,bbc3,bbc4,bbc7
 wget -U 'Freevo Listing' \
      -O '/tmp/listings.xml.bz2' \
      "$BASE_URL?days=$DAYS&format=$FORMAT&file=$FILE&channels=$CHANNELS"
rm -f /tmp/listings.xml
bunzip2 /tmp/listings.xml.bz2
cat /tmp/listings.xml | perl -pi -e 's/(\d{14,})/$1 +0000/g' >/tmp/TV.xml
cd /usr/lib/python2.3/site-packages/freevo/
su -c "freevo execute tv/epg_xmltv.py" freevo

Reply via email to