XMLTV is a set of utilities to manage your TV viewing. They work with TV listings stored in the XMLTV format, which is based on XML. The idea is to separate out the backend (getting the listings) from the frontend (displaying them for the user).
XMLTV is more recent then my version of Gentoo, so I had to download a recent version of the package.
Install XMLTV:
ACCEPT_KEYWORDS="~x86" emerge xmltv
Configure the channels you want to list:
tv_grab_<nn> --configureThis creates the file
~/.xmltv/tv_grab_<nn>.conf
which you can edit if you want to make changes to your configuration.
You can now get your TV programme from the internet:
tv_grab_<nn> --slow --days 2 --output <file>
I use XMLTV to generate an HTML page showing the TV programme. This is nothing new: the XMLTV home page shows other such developments.
If you are interested, you can have a look at a sample programme and download the scripts.
My system works in 2 steps:
buildProgrammes.pl retreives TV programmes from the internet,
which is a pretty long lasting task.
This is done with the help of crontab.
The script generates one XML file per TV station.
buildGuide.cgi generates a web page on demand.