Site hosted by Build your free website today!

Modifications to Get TV Grid

Back to Home
News, Download , What Changed?, Known Bugs , How to Use, What's left to do?

Latest News


   One of the things I really like about open source projects is the ability to build off of someone else's work to add the little touches that you personally want. That's what's happening here.

   Bruce Winter's fantabulous Misterhouse home automation project, which is incredibly useful even if you don't have any fancy light switches or motion sensors, has the ability to download TV listings from online sources and process them for easier local viewing, and for notifying you when your favorite shows are going to air. I wanted it to do a little more, so I tinkered a bit, and this page contains the results.


   Latest files can be found here. Use shift-click or right-click to download. Ideally, this will be merged into the main download of misterhouse, but not until it's gone through some testing and tweaking to ensure it's useful.

   You might not have to change your .ini file to use these, but I still recommend reading the How to Use section here to make the most of this. Please send feedback and comments to me, either on the misterhouse-users list, or at ufuiy001 [at] (Sorry, I had to munge that so the web-scraping spammers won't get my email address.)

or if you prefer Winzip:

(Author note: Bruce wrote these originally; I've just been mercilessly hacking at his code to make it do what I want to do. Please don't give me more credit than I deserve...)
Updated version of get_tv_grid and Unpack both of these files in misterhouse's bin directory. I'd rather have be inline in get_tv_grid, but I'm not smart enough with Perl packages to figure that out. Send me an update if you know how to do this. :-)

This version is essentially identical to the previous versions in functionality, but with rewritten URL-retrieval code which seems to be more reliable. It now mimics someone physically browsing zap2it, but this results in a lot of downloaded data that is simply discarded along the way.

This is in no way intended to be a final product, but just a stopgap release to get downloads working again while I continue work on the db-driven one. The code has been significantly restructured in an effort to educate myself about networking in Perl.

Feb. 26, 2002
or if you prefer Winzip:
Modification of that uses some of the new options of get_tv_grid. You don't need this, unless you want an example to use when altering your own This is already quite out of date with what I use myself.
Feb. 26, 2002


What Changed

   So what changed?

Known Bugs for the latest version

How to Use
   This should be a drop-in replacement to your existing get_tv_grid. However, if you'd like to play around with the options a bit more to get the most out of it, your might want to simply run "get_tv_grid -help" and read the usage message. The specific options I've altered or added are in the following table, but you don't need to use any of them if you don't want to.

New or Altered get_tv_grid options:
-channel_max   xyz
The highest channel number you want to see. Overrides any entries in your keep and skip lists. Defaults to 9999.
-channel_min  xyz
The lowest channel number you want to see. Works same as above. Defaults to 1
-purge xyz
Age in days of DB entries that you would like purged from the DBM. Defaults to 28.
If specified, includes the footer at the bottom of the listings page.
-table_channels xyz
Number of channels to put into one HTML table before closing it off and starting a new one. Defaults to 40.
-timebars xyz
Number of channels between each timebar. Defaults to 5.
If specified, get_tv_grid will not delete the raw HTML files it just downloaded and/or used. This can be useful if you're playing with the above options to get things more to your liking.

  Also, you might want to alter your .ini files to have some entries like these. I've defined two databases, tv and sat, to contain my local listings and my satellite listings in separate pages and databases. There's probably easier and/or better ways of doing this, but this works for me.
# mh.private.ini entries for Denver
# local broadcast
tv_provider = 5452908
tv_name = Local Broadcast   @ Used to give a useful label on the web pages
tv_hours=02,06,10,14,18,22  @ Which hours to get.  Use all for all hours
tv_label=none               @ Which web link name.  Use none to disable,
tv_channels_keep=2,4,6,7,9,12,20,31,59 @ Which channels to keep
tv_channels_skip=           @ Which channels to skip
tv_channel_min= 2
tv_channel_max= 59
# mh.private.ini entries for Denver
# satellite tv
sat_provider = 25066
sat_name     = Dish Network Top 100   @ Useful label
sat_hours=02,06,10,14,18,22  @ Which hours to get.  Use all for all hours
sat_label=none               @ Which web link name.  Use none to disable,
sat_channels_skip=           @ Which channels to skip


What's left to do?

   Quite a lot! I've actually begun a db-driven version of this that would retrieve data for multiple sources (broadcast, cable, satellite, etc.) to a common DB, and then use a separate script to generate multiple TV listing tables from the DB based upon whatever criteria you supply. Since this will take a while, the existing versions will continue to be supported until the db-driven versions are done and pass some amount of beta testing. Planned features probably include: