Movie Guide, converts Press Association (via easycinema) or hollywood.com cinema listings into a format readable by PDA's Copyright (C) 2001-2005 Richard Lawrence This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Abstract -------- Movie Guide syndicates cinema listings from either the Press Association (via easycinema) or hollywood.com and presents them in a handheld friendly format for viewing on PocketPC, Symbian or Palm PDA's. It is deliberately designed to be low bandwidth and with minimal clutter. Pre-requisits ------------- You need: * Website to host the script * Ability to run scripts from this account * Perl installed * LWP perl module (if you have perl, you should have this) * A willingness to hack You might want (but its not essential): * A bit of perl knowledge or a helpful perl guru nearby * Some strong coffee Installation ------------ Stick the movieguide.cgi file somewhere on your webserver. If you're using UNIX then you'll need to make the file executable with: chmod 755 movieguide.cgi If you're using Windows or have perl located somewhere else apart from /usr/bin/perl then you'll need to change the first line of the script. If you wish to enable caching (that is, where the code keeps a local copy of the pages to speed things up) then you'll need a directory called "cache" with the following permissions: chmod 777 cache Running ------- You call Movie Guide by simply going to the url where its located. For example: http://myserver.com/~myaccount/movieguide.cgi If you haven't modified the code in any way you'll get a couple of London cinemas. You'll more than likely want to change this. Congfiguration -------------- All configuration settings are held within the movieguide.config file. Each line can contain a preference in the format: NAMEOFPREFERENCE value where the blank gap is a tab. Comments are on lines which are prefixed with a #. The first thing you'll want to do is decide what source you want to use. If you are in the UK then you'll want to make sure that the CINEMASOURCE setting is "uk" like this: CINEMASOURCE uk If you live in America then you'll want to use hollywood.com's settings which are enabled with "usa" like this: CINEMASOURCE usa There are a few other settings in this file which you can play around with to change various options. There are plenty of comments within the file to guide you. One of the most often confused is the "most popular" films setting (which is the MAXPOPULAR variable). This simply presents the most popular showing films on the front page for easy viewing. Please note that the measure of popularity is simply the number of cinemas in your own configuration that is showing this film. As such, people will different selections of cinemas will more than likely see a different top 10. Although there is no current functionality to show the box office top 10 you can get pretty close to this list by including several big cinemas in your configuration. This is because, generally, the higher up in the box office a film is, the more cinemas it is shown in. Selecting cinemas ----------------- Although there are different sources, the general idea is pretty much the same. If you're in the UK, visit http://www.easycinema.com/ and if you're in the USA visit http://www.hollywood.com/ Now search for your favourite cinema. Once you have that on the screen you will need to get a specific code out of the address. For easycinema the URL will look something like this: http://listings.easycinema.com/venue.php?venueid=odward&page=1 ... The ID for this cinema is odward (which is the Odeon on Wardour Street). For hollywood.com the URL will look something like this: http://www.hollywood.com/showtimes/theatre_detail.asp?searchtheatre=823 The ID for this cinema is 823 (which is the Landmark Guild 45th in Seattle, WA). Now you know the ID of your cinema, you should add this to the movieguide.cinemas file. The format of this files is that, for each cinema, you should have a line which is: cinema id;name of the cinema so, using our examples above, you could have odwar;Odeon, Wardour Street and 823;Landmark Guild 45th, Seattle Note that the description can be anything you want so: odwar;Pokey little cinema near the office works just as well. As with the configuration file, lines starting with a # are ignored. You will find a number of examples in the file which may need to be uncommented. Viewing on your PDA ------------------- Once everything is set up you can view the listings on your PDA by simply visiting the url in your PDA's webbrowser. Of course, unless you have 24 hour net access this isn't going to work very well. But if you have an offline webbrowser, then you can download the pages onto your PDA. There are many different offline webbrowsers but the one popular one is called AvantGo (http://www.avantgo.com/) and it available for several different platforms. Once you have it installed and you've registered on the site (it's free to do so), simply select "Create Custom Channel" and enter the url of this script. You want the maximum size to be 20k (which should be plenty enough unless you have a vast number of cinemas), link depth to be 2, include images to be set to Yes, follow off-site links to be set to No and for it to refresh on every sync. Once you've added the channel, syncronise your PDA and the films should appear! Another popular offline browser that doesn't require registration or rely on an externally managed server is Plucker (http://www.plkr.org/). Problems? --------- Q. I've configured the cinema's but nothing is shown A. Check that you have selected the correct CINEMASOURCE. If you list UK cinemas and have it set to "usa" then you won't see anything and vice versa. Q. Nope, still can't see anything A. Check that the format of the line in movieguide.cinemas is correct. If it isn't, then nothing will be seen. Q. Still can't see anything and my settings are right. A. Check that the site is actually displaying listings, if it isn't then this will be the problem since Movie Guide will only list a cinema if there is at least one film showing. Q. The website is fine too. Is there a problem with the code? A. It sounds like it. Send an email to richard (at) fourteenminutes (dot) com and it will be investigated. Finally ------- This code syndicates listing information from the Press Association (via easycinema) and hollywood.com without either their permission. At time of writing, hollywood.com allow you to use the data for personal non-commercial use. The terms and conditions for easycinema were not immediately available for viewing. As such, it is not recommended to publish your site for others to use without written permission from these sites unless you really do like nasty letters from their lawyers. Last updated: 12 August 2005