[mythtv-users] Offline DataDirect database updates how?
Michael T. Dean
mtdean at thirdcontact.com
Thu Jun 3 15:52:23 EDT 2004
papenfuss at juneau.me.vt.edu wrote:
> Hello all... due to logistic at the home, the mythtv box is offline.
>Always. No cable modem, dsl, isdn, dialup, nada. Yes it's a PITA.
Wow. I remember working like that. Weren't the '80's great? ;)
> I brought the machine into my office last weekend and fried up the CVS
>with datadirect. I had figured out how to manually update the database once a
>week or so by bringing a floppy with the compressed xml data home. Basically,
>tv_grab_na --config-file $CONFIG --output $OUTPUT
><insert sneakernet of $OUTPUT here>
>mythfilldatabase --file Television -1 $OUTPUT
>Now without tv_grab_na, this obviously doesn't work. I've managed to get some
>xml data out of a 'ddclient' CLI program. The mythfilldatabase doesn't seem to
>import it with the same command anymore. Any thoughts on how I might update
>the system now?
Use tv_grab_na_dd (see below).
>Since I despise perl and tv_grab_na_dd is supposedly a
>temporary hack anyway, I'm not excited about trying to anally insert a
>newer xmltv into my mosly-source-compiled mythtv box.
Actually, tv_grab_na_dd is not a temporary hack. It is an official part
of the XMLTV distribution and is replacing tv_grab_na permanently.
The temporary hacks are the scripts posted--which seem to have started
from mine--for using tv_grab_na_dd with Myth 0.14. Isaac (rightly)
decided that supporting tv_grab_na_dd in older versions of Myth would
distract developers, who should be concentrating on current/future
versions instead of old versions. That being said, in your case, using
tv_grab_na_dd (even with current versions of Myth) is probably the only
available solution since you need the data placed into an intermediate
file. The best script available seems to be the one posted at
http://www.mythtv.info/moin.cgi/DataDirectHowTo . You'll have to
customize it for use with your sneakernet, but it provides a good reference.
Note that the tv_grab_na program screen-scraped (hundreds of) HTML pages
from the Zap2It website (owned by Tribune Media) to retrieve each day's
program listing information and output it in the XMLTV format (an XML
format based on the XMLTV DTD). The tv_grab_na_dd script instead uses
an XML web service to retrieve XML data in Tribune Media Service's
DataDirect XML format. It then "transforms" the DD XML into XMLTV's XML
format. Therefore, whether you use tv_grab_na or tv_grab_na_dd, your
final output is the same (the difference is the load on Tribune's
servers, the amount of information available (DD has much more info),
and at least a 25x reduction in download time). When you used the
ddclient program to download information, you received information in
the DD XML format--which mythfilldatabase does not know how to process.
Therefore, I suggest using tv_grab_na_dd. As far as compiling XMLTV
(and all its dependencies) from source, try:
# perl -MCPAN -e shell
cpan> install E/ED/EDAVIS/xmltv-0.5.33.tar.gz
Not too bad, is it? (Of course, there is the whole security issue
involved with having root automaticaly download/run code off the 'net,
but it worked for me, it's only necessary the first time, and it's a lot
easier than figuring out the proper order for installing the 18
Note that version 0.5.33 seems to be the most recent version on CPAN,
but 0.5.34 is available for download from SF.net. If you want to update
to 0.5.34, download XMLTV 0.5.34 (no need to download any prereq's,
since they were installed above) from Sourceforge (
http://sourceforge.net/projects/xmltv ), and follow that up with:
$ ( perl Makefile.PL PREFIX=/usr 2>&1 | tee cflog && exit $PIPESTATUS ) &&
( make 2>&1 | tee mklog && exit $PIPESTATUS ) &&
make test 2>&1 | tee mktstlog
$ su -
# make install 2>&1 | tee mkinstlog
(or similar--you might want to use another PREFIX, and may not be
interested in logging the output from the various commands, but that's
how I do mine...).
This process would be much easier than incorporating code that processes
the DD XML file into Myth.
Good luck, and enjoy. HTH.
More information about the mythtv-users