[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TV] Formatting listings like the radiotimes website



On Mon, Mar 07, 2005 at 05:43:14AM +0000, Richard Lewis wrote:
> 
> I have created an XSLT script that fomarts bleb.org listings similar
> to the radiotimes website (horizontally, with the width of each
> programme proportional to its duration).  The output uses only CSS
> (and is valid XHTML).  The list of channels displayed is controlled by
> an XML configuration file.

Interesting. Looks very good!

> I didnt see any documentation on the listings format, is there a DTD
> or schema or just a description available?

There's a description of the format in the mailing list archives
(relatively early on).

> it seems to be that listings start at 6am, and if a programme has a
> start time earlier than this then it is actually "tomorrow".

Nope, it's not that easy. Each channel has a slightly different opinion
of when they start; determined by each channel's own website's listings.
But even then it's not consistent; for example BBC 1 starts at 6am, but
Radio 4 at 5.30am.

> I would have expected that instead you could have an attribute to
> control this: you could make it optional and only set it on programmes
> that start on the following day.

That's something which could almost certainly be easily added.

> I also wondered why you use numbers for the directories, wouldnt it be
> better to name the directories after the day they refer to?

No! That'd make it a lot *harder* to know which days to fetch, and also
make my primary application (the listings website itself) harder to code
and use. That's for my own use, of course - what do other users of the
data think?

I could have the system produce symlinks as appropriate, if needed; but
I hadn't considered that TBH.

> this would it easier for poeple to download only days they don't
> already have. (eg a few days ago I used wget to grab about 5 days,
> when they run out I have to visit bleb to work out if i need to start
> grabbing from 0 or 1 (and then rename the files locally if needed)

But who would you know if the "Monday" you had was this Monday, next
Monday, last Monday, ...?

The point of having them as numbered offsets from today is the
assumption that your application knows which days it fetches. For
example, initially the data is seeded by fetching 0-6, but then usually
only day 6 is ever fetched, with days 0-6 being renamed to -1-5.

This is exactly how the framework downloads the listings itself, and
minimises the amount of data that applications have to download.

To be even more accurate, these days it shifts the data down by
renumbering the directories and then iterating over 0-6 checking if
listings are available and, if not, fetching them. This patches any
holes which may exist and ends up always downloading day 6.

> Do you plan to add the other ITV regions? (also things like BBC 2
> Wales, and there were some other digital terrestrial channels not
> available)

Different regions are planned, but I'm only really motivated if their
listings dramatically differ; other channel requests are welcome, but
will depend on them being on a network which already has a parser or
having a decent website with the wanted information on it.

Hope that helps,

Andrew

-- 
Andrew Flegg -- mailto:andrew@xxxxxxxx  |  http://www.bleb.org/