Your TV Program Listings Via Email
|
Yesterday, I setup xmltv and OnTV to hopefully give me reminders of when my TV programs were coming on. Although I found several problems with OnTV, I thought I'd give it a try. |
There were two shows I watch on a Thursday; one of them had a new episode last night. How did OnTV do in telling me this? Nothing. Nada. Zip. Zilch. No reminders whatsoever. Even if it had reminded me, I'm convinced from looking at the ontv v2.6.0 source code that it can't:
- remind me several hours in advance or give me a summary for a days worth of programs.
- tell me if it's a new episode.
- mail me the list of reminders.
So OnTV is gone. Package removed. It's outta here!
Friday is hacking day. Time to put something together myself that meets my requirements.
Luckily the xmltv package has a couple of really cool extra scripts that help me here:
- tv_grep - filter programmes and channels from an XMLTV listings file.
- tv_to_text - convert XMLTV listings to text.
I put together get_listings.py, a simple Python script that will automatically download my latest TV listings, check for programs I'm interested in, and generate on stdout, a list of programs that have new episodes today.
Hopefully the script is fairly obvious and if you are interested in using it, that it's easy to see what you need to change to customize it for yourself. Don't forget you need to have created an account with Zap2It Labs and installed and configured xmltv. See yesterday's blog entry for more details on that.
The last part of the puzzle was working out how to mail the output from
the script to myself. This involves installing the
GNU mailutils package,
then reconfiguring exim4 to allow me to send remote emails
(the default is just to allow local delivery). The former was just a few
clicks away via Synaptic Package Manager. The latter involved running:
% sudo dpkg-reconfigure exim4-config
So now I can do:
% python get_listings.py | mailx -s "TV Programs" -t my-email-address@sun.com
and a listing of the TV programs I'm interested in for today with be mailed to me. I'm now about to stuff it in a cron job so it's totally automatic.
( Mar 09 2007, 09:06:38 AM PST ) [Listen] Permalink Comments [2]
Comments are closed for this entry.













Posted by 132.236.173.26 on March 09, 2007 at 11:53 AM PST #
Because I didn't know how to and I'd already spent a couple hours on it and I had to do some RealWork(TM). Perhaps v0.2 of the script can have that...
I also believe in the Unix philosophy of a single tool doing a single job and being able to chain them together, but it's not so applicable for a quick hack like this.
Posted by 24.6.152.125 on March 09, 2007 at 12:26 PM PST #