[mythtvnz] tv_grab_nz-py and MythTV 0.20.2
Wade Maxfield
mythtvnz@lists.linuxnut.co.nz
Tue, 4 Sep 2007 17:47:50 +1200
>Is there a howto somewhere that would wean me off the raw channel IDs and
>make use of the new script? What I'd like to do is:
>
> * mysql script to change the channel ID based xmltvid's to named ones
> * grab the epg using my skystar2 card
> * import it using either mythfilldatabase directly or tv_grab_nz-py
>(whatever the difference is)
> * some clues on how to filter out the Sports Extra epg from freeview and
>import just that one channel
>
>Cheers
>
>--
>Robin Gilks
Basics of what I have set up is:
Tune dvbstream to 1219, grab sky based data to .xml file
Tune dvbstream to 1183, grab freeview based data, and split into
individual channel files
merge sky based data with sport extra file, import results with
mythfilldatabase, then reschedule.
My actual script massages the data in a couple of ways, and uploads a
copy to my web server, so I've trimmed it a bit, just leaving the key
bits. You'll no doubt need to tweak this to your setup.
NEWFILE=/tmp/listings_beta-$$.xml
cd /tmp/
# tune to sky transponder
/usr/local/bin/dvbstream -s 22500 -o:/dev/null -f 1219 -p h -n 60 8192 &
sleep 2
/usr/local/bin/epgsnoop > $NEWFILE
killall dvbstream
# wait a bit - since Steve sees overlapping data
sleep 5
# tune to freeview transponder
/usr/local/bin/dvbstream -s 22500 -o:/dev/null -f 1183 -p h -n 60 8192 &
sleep 2
/usr/local/bin/epgsnoop | tv_split --output %channel.xml
killall dvbstream
sleep 2
# merge the data
tv_cat --output /tmp/listings-latest_beta.xml
/tmp/sportextra.freeview.co.nz.xml \
/tmp/tvnz6.freeview.co.nz.xml $NEWFILE
# and fill the database
mythfilldatabase --no-delete --file 2 -1 /tmp/listings-latest_beta.xml
mythbackend --resched
- Wade