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.gz
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.