TV series episode announcer

So I finally got too annoyed by irregularity of new episodes and wrote a simple announcer. Output is RSS feed which shows all aired episodes including today. It's nothing fancy and it's very simple to define new feeds:

template.php
<?php
 
$DESCRIPTION = 'Your Favourite Show ANNOUNCE';
$URL = 'http://en.wikipedia.org/wiki/List_of_Your_Favourite_Show_episodes';
$DATE = 5;
$EPISODE = 6;
$TITLE = 2;
 
include 'backend.php';
?>

As you see, only thing you need is URL for Wikipedia page and to define which columns are used for airing date, episode number and title. Be sure to test it, Wikipedia uses a lot of redirects which might end up with 403 Forbidden.

You can add these HTTP parameters to URL to change output:

  • ?all=true – show all found episodes
  • ?invert=true – show only future episodes (today does not count as future)

As a bonus I made rss2ical script which converts announcer output to calendar. Just replace RSS_ANNOUNCER_URL with the real announcer URL.

serialy.disorder.sk is based on these scripts, they are being executed from cron job. I advise to use this instead of running your own version or at least using it only from cron (3 times a day is plenty) as Wikipedia may return 403 Forbidden status.

Download:

stuff/episode-announcer.txt · Last modified: 2010/08/03 08:21 (external edit)