The XMLTV format is designed for storing TV listings in XML. It was originally created by my co-aulmni Ed Avis at Imperial College.
This script converts an XMLTV file into a set of XHTML files displaying the TV listings sorted by time and date, by genre and by channel. Whatsmore, the XHTML is marked up using RDFa which allows the data to be parsed and handled by RDF tools.
You probably want to use this script as part of a tool chain including XMLTV grabbers and tv_grep. I use it as part of the following script, run automatically at 6 am every day:
#!/bin/sh DIR=/home/tai/public_html/vhosts/goddamn.co.uk/tv tv_grab_uk_rt --days 2 >$DIR/tv.xmltv tv_grab_uk_bbcbackstage >$DIR/radio.xmltv tv_cat $DIR/tv.xmltv $DIR/radio.xmltv >$DIR/all.xmltv tv_grep \ --on-after `date -Is -d "6am today"` \ --on-before `date -Is -d "6am tomorrow"` \ <$DIR/all.xmltv \ >$DIR/today.xmltv rm -f $DIR/*.html /home/tai/bin/xmltv2xhtml.pl \ --d_fmt='%A' \ --target-directory=$DIR/ \ $DIR/today.xmltv
Name | Last modified | Size | Description | |
---|---|---|---|---|
Parent Directory | - | |||
example-tv/ | 2009-03-24 11:24 | - | Example output (Not updated regularly!!) | |
xmltv2xhtml.pl.html | 2009-03-24 11:30 | 166K | Perl script with syntax highlighting | |
xmltv2xhtml.pl.txt | 2009-03-24 11:29 | 19K | Perl script | |
COPYING | 2009-02-24 16:09 | 18K | GNU General Public Licence | |