Required components

Optional components

License

See the License Terms.

Installing

  1. If you don't have Python 2.3 on your system, stop here; you can't use this program. Note: the Python binaries built into Mac OS X 10.2 (Jaguar) and prior lack support for the XML parsing libraries, and will not work.
  2. Copy itms_rss.py to your CGI directory and make sure it is properly executable. You may want to remove the .py extension and/or replace it with a .cgi extension, depending on your server. See your operating system and/or web server documentation for details.
  3. Copy feedparser.py to a location in the Python search path for itms_rss.py. The most straightforward location is the same location as itms_rss.py, though this is possibly undesirable if that happens to be a location in your web server's document root. See your web server documentation for details. You can edit the Python search path itms_rss.py by modifying it to extend sys.path. See the Python documentation for details.
  4. If you wish to use the sample style sheet provided, copy style.css to a location in your web server's document root.

Usage

The default output from the CGI script is to generate a web page from the RSS data. The output can be configured slightly via CGI field data, which is accepted as either as a URL query attribute on a GET or POST request or as form values on a POST request.

By default, it outputs 10 items from the feed. The CGI script will take a limit field which can be used to change the maximum number of items shown. Attempting to set limit to anything other than a positive integer will result in an error from the script. Note: The server providing the feed appears to convert values greater than 100 to 15, so you probably should avoid anything over 100.

The default output probably looks pretty bland in your browser, but the HTML tags in the output use CSS, which allows them to be customized by adding a style sheet, which can be acheived by using the stylesheet field. Further customization can be done by editing the source code.

The title and description fields may be used to provide an alternate title and description.

The query field may be used to specify which type of feed to retrieve. The accepted values for query are:

You may wish to embed the script into an existing web page using a server-side include mechanism. Setting the format field to a value of include will cause the CGI script to output an HTML snippet for the feed suitable for inclusion, rather than a full HTTP response. Note: the stylesheet setting affects the header of the HTML document, which is not generated for the include format. The containing document must define the styles or include the style sheet itself.