[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TV] Hi
> >>IMHO, the use of + and - days makes the system a little more
> >>complicated, as does having data from two different days in one XML
> >>If I were making the listings (which i'm not, and thanks _very_ much for
> >>providing them :-), i'd only include midnight-midnight listings in each
> >>file and allow retrieval by date rather than +/- days.
> > You did see that the xmltv project mandates that all the data is in one
> > though?
> I don't know about xmltv but i'm not arguing against having all the data
> in one file. If done correctly, that could work. It's just confusing to
> have a file identified by one date which contains programmes for only
> 3/4s of that day and 1/4 of the following day!
Oh, I see!! Yes, I agree. However, I *think* that was what was meant
The files are labelled in days offset as well, ie today, +1, +2, etc. I
assume that the hypothetical cgi would do the same, ie +0 gives you midnight
to midnight for today, not part of this day and part of tomorrow.
So I think that we are all on the same page then - now who is going to write
...I am right out of time, and probably about to leave the country for 2
months, however, try this:
Assuming no conversion of XML to different DTD, then we want the following
ChannelsArray = ParseParams(CHANNELS);
DaysArray = ParseParams(Days);
$Output = $PreAmble;
FOR EACH D IN DaysArray
FOR EACH C IN ChannelsArray
$Output = $Output & Slurp("$BASEDIR/$D/$C.XML";
$Output = $Output + $PostOutput;
/* Optionally Compress Output */
I think this could be knocked up in PHP quite easily.
If DTD modification is required then this needs to be done in Slurp.
However, perhaps if no one yet cares about the exact naming in the XML then
we could make the original more like whatever xmltv uses anyway? (Your data
though, over to you)