Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


sultanoswing

818 posts

Ultimate Geek
+1 received by user: 160


#90470 22-Sep-2011 07:47
Send private message

I posted this over at the MythTVNZ mailing list, but thought it may be of use here too.

Here is a very simple shell script for pulling NZ EPG data (7 days' worth) into your MythTV backend. 

Various other methods I've found either seemed a) complicated (the MHEGTVNZ script, needing rb-download etc) and/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.

Paste it into a text file, save it with a ".sh" extension, make it executable (chmod +x) then run it as a daily cron task at, say, 3am and you never need be without an up-to-date EPG! 

#! /bin/bash 
wget http://nzepg.org/freeview.xml.g
gunzip freeview.xml.gz 
mythfilldatabase --file 1 freeview.xml --update 
rm freeview.xml 
exit 
 

ps this method is contingent on the xml file being available at nzepg

pps the freeview.xml which the script downloads is the same as that called for in the tv_grab_nz-py script, and contains the EPG data for both FreeviewHD (DVB-T) and Freeview satellite (DVB-S) channels.

Create new topic
KShips
153 posts

Master Geek
+1 received by user: 15


  #529110 4-Oct-2011 16:12
Send private message

Awesome, Thanks Laughing



sultanoswing

818 posts

Ultimate Geek
+1 received by user: 160


  #529142 4-Oct-2011 17:13
Send private message

Ah ha!

Not that I'm sensitive about such things, but it's nice to get at least ONE positive message about this ridiculously simple & easy script :)

 

KShips
153 posts

Master Geek
+1 received by user: 15


  #529148 4-Oct-2011 17:19
Send private message

After the frustration of trying to get other solutions to work and failing badly (ok so I'm still on the learning curve with Linux) I could not believe my eyes as the guide came up with all the entries :) I was almost jumping around the room in excitement at something so easy.

 



sultanoswing

818 posts

Ultimate Geek
+1 received by user: 160


  #529181 4-Oct-2011 21:02
Send private message

I'm not on a linux learning curve (well, it's an endless process, I suppose), but I couldn't get any of the other solutions to work either. Necessity being the mother of invention as they say, and following a KISS principle, led me to this solution.

It's great to read it's working for someone else, and therefore that I'm not just delusional at how simple it is! Laughing

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.