From c8a1be81af458ba096239461d69245c914070516 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 1 Dec 2000 18:37:46 +0100 Subject: Fixed handling of channel names that contain '/' --- epg2html.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/epg2html.pl b/epg2html.pl index 06d76b74..215eb735 100755 --- a/epg2html.pl +++ b/epg2html.pl @@ -12,7 +12,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: epg2html.pl 1.1 2000/11/26 15:23:39 kls Exp $ +# $Id: epg2html.pl 1.2 2000/12/01 18:37:46 kls Exp $ @Index = (); @@ -39,9 +39,10 @@ while (<>) { chomp; if (/^C ([^ ]+) *(.*)/) { my $Channel = $2; - (my $Page = $Channel) =~ s/ /_/g; + (my $Page = $Channel) =~ y/\/ /-_/; + $Page .= ".htm"; $Channel = Tags($Channel); - push(@Index, qq{$Channel
\n}); + push(@Index, qq{$Channel
\n}); my %Events = (); while (<>) { if (/^E (.*) (.*) (.*)/) { @@ -75,7 +76,7 @@ while (<>) { push(@Schedule, "" . GetTime($t) . "$Entry\n"); } push(@Schedule, "\n") if (@Schedule); - open(PAGE, ">$Page.htm") or die $!; + open(PAGE, ">$Page") or die "$Page: $!\n"; print PAGE "\n$Channel\n\n"; print PAGE "

$Channel

\n"; print PAGE @Schedule; @@ -87,7 +88,7 @@ while (<>) { } } -open(INDEX, ">index.htm") or die $!; +open(INDEX, ">index.htm") or die "index.htm: $!\n"; print INDEX "\nEPG Index\n\n"; print INDEX sort { lc($a) cmp lc($b) } @Index; print INDEX "\n\n"; -- cgit v1.2.3