> On Mon, 2004-02-23 at 10:24, [EMAIL PROTECTED] wrote:
>> Make that freevo version 1.4.1.
>>
>> So I figured out my TV Guide listings and ran into a new problem, I'll
>> start a different thread for that.
>>
>> Here was the problem, this is how the output from the tv_grab_na showed
>> up
>> in /tmp/TV.xml:
>>
>> <channel id="C3tvgos.zap2it.com">
>> <display-name>3 TVGOS</display-name>
>> <display-name>3</display-name>
>> </channel>
>>
>> When I ran the xxmltv2freevo.pl script this is how the out put looked:
>>
>> ('C3tvgos.zap2it.com', '', '3')
>>
>> All I had to do was add the 3 TVGOS in between the empty single quotes,
>> like this:
>>
>> ('C3tvgos.zap2it.com', '3 TVGOS', '3')
>>
>> After that my guide was no longer corrupt and showed the listings.
>>
>> Hope that helps someone else,
>>
>> Jon
>>
> There is a bug in the regular expression ordering. I ran into this a
> couple weeks ago, and had not got around posting it to the mailing
> list. I spent a couple hours mucking about before I figured out that
> the listings need all three elements. Only tested on tv_grab_na
> listings.
>
> #!/usr/bin/perl
>
> while (<STDIN>) {
> chomp;
> if (/^\s+<channel\sid=\"(.*)\">$/) {
> $last_id = $1;
>
> # This test is a bit less generic than the next, so running
> # it first makes things work better.
> } elsif (/^\s+<display-name>\d+\s(.*)<\/display-name>$/) {
> $last_name = $1;
>
> # This test is a bit more generic than the last, so running
> # it later makes things work better
> } elsif (/^\s+<display-name.*>(.+)<\/display-name>$/) {
> $last_chan = $1;
> } elsif (/^\s+<\/channel>$/) {
> print "('$last_id', '$last_name', '$last_chan'),\n";
> }
> }
> --
> Regards,
> Rich
>
> Current Conditions in Des Moines, IA
> Overcast
> Temp 33.8F, Windchill 27F
> Winds out of the North at 8mph
>
Rich!!! Fantastic man, this worked great! I can't program in any language
s I could have never done this. Thanks for taking the time to post back
and add this in there. One question, how hard would it be to have it sort
on the last field? So channel 1 would come first then on down the line
through 953, would this be very difficult? Is there a little program in
Linux that I could use to sort the listing?
Thanks again,
Jon
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-users