Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 100 lines (59 sloc) 2.443 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
get_streams
===========

get_streams is a program that parses the BBC radio web site looking for
Real Audio streams of program content. The streams found are then written
to a YAML (see http://www.yaml.org/) file for later processing.

The distribution also includes a sample index.tt file which can be used
to generate a web page from the YAML data.

The intention is for people to be able to sidestep the BBC's complex
navigation and open the streams directly in RealPlayer.

The URLs of the stream may also be of use to people using something like
Ben Hammersley's RadioPod application
(see http://www.benhammersley.com/weblog/2004/11/14/releasing_radiopod.html).

If you don't want to go to all the hassle of installing and running the
program yourself, then the output will be online at

  http://dave.org.uk/streams/


Requirements
============

get_streams is a Perl program, so you'll need Perl installed. A recent
version (at least 5.6.x) is recommended.

You'll also need the following extra Perl modules from CPAN
(http://search.cpan.org/).

  * LWP::Simple
  * HTML::TreeBuilder
  * URI
  * YAML

The index.tt file is a Template Toolkit. To use it you'll need to install
the Template Toolkit from either CPAN or http://tt2.org/. You will also
need the Template::Plugin::YAML module.


Usage
=====

To run get_streams, simply run it from the command line

  $ ./get_streams

There is one optional parameter which is the name of the YAML file to
store the date in.

  $ ./get_streams streams.yaml

If no YAML filename is given then 'streams.yaml' is used.

To use index.tt to create a web page, you can use the 'tpage' program
which is installed as part of the Template Toolkit.

  $ tpage index.tt > index.html

To read the YAML data from a different file, use the --define option.

  $ tpage --define yaml_file=another.yaml index.tt > index.html


Bugs
====

Yes, it's not perfect yet. This is probably because of some flaky HTML
on the BBC pages and not because of problems with my coding ability :)

I'm working on ironing out the glitches.


Latest Version
==============

The latest version will always be available from

  http://dave.org.uk/code/


Copyright
=========

Copyright 2004, Dave Cross, All rights reserved.

This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.


Author
======

Dave Cross <dave@dave.org.uk>

I like to hear about people using my software.

Something went wrong with that request. Please try again.