[mythtv-users] tv_grab_dvb cron scripts

Berry, David David.Berry at dcita.gov.au
Wed Mar 9 22:05:47 UTC 2005


> These seem to work properly from the command line; this is my first
try
> at scripts.
> 
> I'm just learning basic linux stuff and am not sure if I have gone
about
> this the right way in regards to permissions, and how the scripts
> execute etc...

I've been doing the same thing - although in Australia, there are only
five channels, and only two give out any decent EPG information via DVB.

The only thing I saw with your script was that you need to tune each
channel to get the EPG for it BEFORE running tv_grab_dvb.

I modified tzap a little so once it tunes to a signal, it exits, rather
than displaying the stats until you exit.

It works, but seems to be of little value as there is really no data to
grab.

This is what I've worked on so far:

# Where we will store the tv_grab_dvb output for processing
ABC_FILE="abc.xml"
CAP10_FILE="cap10.xml"
SBS_FILE="sbs.xml"
WIN_FILE="win.xml"
PRIME_FILE="prime.xml"

# The names of the channels in the channels.conf file for tuning
ABC_NAME="ABC"
CAP10_NAME="SC10"
SBS_NAME="SBS"
WIN_NAME="WIN"
PRIME_NAME="PRIME"

# The name of the channel pulled from DVB
ABC_DVB="529.dvb.guide"
CAP10_DVB="2055.dvb.guide"
SBS_DVB="849.dvb.guide"
WIN_DVB="1.dvb.guide"
PRIME_DVB="2374.dvb.guide"

# The names of the channel in the DB
ABC_CHAN="dvbfree.Canberra.2"
CAP10_CHAN="dvbfree.Canberra.10CAP"
SBS_CHAN="dvbfree.Canberra.SBS"
WIN_CHAN="dvbfree.Canberra.WIN"
PRIME_CHAN="dvbfree.Canberra.PrimS"


# Function that does the main work
#
# Pass in parameters NAME, FILE, CHAN, DVB NAME
function getInfo {

echo "Getting info for $1"

# Tune the card into the channel
./tzap -c channels.conf $1

# Get the current and next program information
./tv_grab_dvb -o +10 -c > $2

# Change the DVB names to the DB names
perl -pi -e "s/$4/$3/g;" $2

# Do database import for each file here - TODO
}

getInfo $ABC_NAME $ABC_FILE $ABC_CHAN $ABC_DVB
getInfo $CAP10_NAME $CAP10_FILE $CAP10_CHAN $CAP10_DVB
getInfo $SBS_NAME $SBS_FILE $SBS_CHAN $SBS_DVB
getInfo $WIN_NAME $WIN_FILE $WIN_CHAN $WIN_DVB
getInfo $PRIME_NAME $PRIME_FILE $PRIME_CHAN $PRIME_DVB




More information about the mythtv-users mailing list