[mythtvnz] Simple Script For Pulling EPG into MythTV

Curtis Walker sultanoswing at gmail.com
Thu Sep 22 12:08:27 BST 2011


I don't know - "tv_grab_nz-py" wouldn't run for me either (Myth 0.24). 
Alt-tabbing out showed it just hanging there after running it in Myth's 
backend setup (under "Video Sources", with the nz (xml) py selected as 
the grabber, the choosing "Configure", it ran, downloaded some stuff, 
then... no data imported). It'san older script, and my linux distro 
(Arch) is now using Python 3. Although I tweaked a few things, and even 
compiled MythTV with a python 3 specific flag, it still didn't run and 
insert the data as advertsied.

Anyway, I gave up on it at this point, but noting that it sourced the 
nzepg freeview.xml file, I simply wrote my own script as below, to do 
the job MythTV and tv_grab_nz-py SHOULD have done, and seems to be doing 
for others. FWIW, my crontab is as follows (no quote marks): "00 3 * * * 
/home/username/bin/mythTVupdateEPG.sh"

What could be easier?

And because it's using the same dataset as the tv_grab_nz-py script, 
you're getting the same EPG data i.e. DVB-T and DVB-S.

Cheers,
Curtis



On 22/09/11 22:13, Roger Searle wrote:
> On 21/09/11 22:08, Curtis Walker wrote:
>> Hi All,
>>
>> I'm a noob, but here is a very simple shell script for pulling NZ EPG 
>> data (8 days' worth) into your MythTV backend.
>>
>> Apologies to all if this is telling you how to suck eggs, but the 
>> various other methods on geekzone and this mailing list either seemed 
>> a) complicated or b) didn't work for me (tv_grab_nz-py and Myth on my 
>> setup didn't work properly - possibly something to do with Arch linux 
>> running Python 3).
>>
>> As you can see, this script will download the freeview.xml.gz file 
>> from nzepg.org, unzip it, install it into Myth's backend, then clean 
>> up. Running it as a cron task daily at 3am, you never need be without 
>> an up-to-date EPG!
>>
>> *#! /bin/bash
>> wget http://nzepg.org/freeview.xml.gz
>> gunzip freeview.xml.gz
>> mythfilldatabase --file 1 freeview.xml --update
>> rm freeview.xml
>> exit
>> *
> Thanks Curtis, nice timing for me as my first batch of data had nearly 
> expired and I wasn't clear why mythtv itself wouldn't update it for 
> me.  I've got another 8 days' worth again, using these lines.
>
> While I could of course run this via cron, I'm interested to discover 
> what needs to be done to have mythtv doing it for me, as I understood 
> that was supposed to happen. I have
>
> Channel Frequency Table = New Zealand
> mythfilldatabase run frequency (days) = 1
> mythfilldatabase execution start = 2
> mythfilldatabase execution stop = 5
> Run mythfilldatabase at time suggested by the grabber = yes
> Video source setup listings grabber = New Zealand (py) (xmltv)
>
> Yet the EPG data was on it's last day.  What have I missed?
>
> Cheers,
> Roger
>
>
>
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/



More information about the mythtvnz mailing list