vdr/epg2html
Klaus Schmidinger bda389f8b0 Version 1.7.40
VDR developer version 1.7.40 is now available at

       ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.40.tar.bz2

A 'diff' against the previous version is available at

       ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.39-1.7.40.diff

MD5 checksums:

f59a7ac199248a870e157c66a6ffc24d  vdr-1.7.40.tar.bz2
acff088cc27296cb2c5b794ad4b2e0a8  vdr-1.7.39-1.7.40.diff

WARNING:
========

This is a developer version. Even though I use it in my productive
environment. I strongly recommend that you only use it under controlled
conditions and for testing and debugging.

Approaching version 2.0.0:
==========================

If there are no more serious bug reports, the final version 2.0.0 of VDR
shall be released on March 31, 2013.
So please test this developer version intensely and report any problems
you might encounter as soon as possible.

From the HISTORY file:
- The "Recording info" page of the skins that come with VDR now displays the name of
  the channel (if available) from which this recording was taken.
- Updated the Catalan OSD texts (thanks to Luca Olivetti).
- Updated the Spanish OSD texts (thanks to Luca Olivetti).
- Added a note about the new default sort order of recordings to the release notes of
  version 1.7.29 and the UPDATE-2.0.0 file (pointed out by Wolfgang Rohdewald).
- Fixed a faulty UTF-8 character in cs_CZ.po.
- Added the system's character set to the page header in the epg2html script (pointed
  out by Dimitar Petrovski).
- Updated the Slovenian OSD texts (thanks to Matjaz Thaler).
- The new option "Setup/OSD/Always sort folders first" can be used to control whether
  folders will be always at the top of the Recordings menu, or will be interspersed
  with plain recordings when sorted alphabetically.
- Updated the Swedish OSD texts (thanks to Richard Lithvall).
- Updated the Chinese OSD texts (thanks to Nan Feng).
- Updated the Slovak OSD texts (thanks to Milan Hrala).
- Updated the Macedonian OSD texts (thanks to Dimitar Petrovski).
- Updated the Dutch OSD texts (thanks to Cedric Dewijs).
- Updated the Czech OSD texts (thanks to Ales Jurik).
- Updated the Ukrainian OSD texts (thanks to Yarema Aka Knedlyk).
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Updated the French OSD texts (thanks to Dominique Plu).
- Updated the Finnish OSD texts (thanks to Matti Lehtimäki).
- Updated the Arabic OSD texts (thanks to Osama Alrawab).
- Updated the Romanian OSD texts (thanks to Lucian Muresan).
- Renamed the "plp id" to a more general "stream id" and added support for DVB-S2
  "Input Stream Identifier" (ISI) (based on a patch from Rolf Ahrenberg).
  With this VDR now supports "multi streaming" on DVB-S2 and DVB-T2 transponders.
- Fixed a possible deadlock when changing the audio track while replaying a recording.
- Fixed resuming replay of PES recordings (reported by Oliver Endriss).
- Limited the Goto() call in cDvbPlayer::SetAudioTrack() to the main thread, in order
  to avoid a crash when the track is automatically set from the player thread.
- The LCARS skin now calls SetAntiAliasGranularity(20, 16) in order to reserve enough
  fixed colors on 8bpp displays with anti-aliasing.
- Changed the default values for the OSD size back to those before version 1.7.29,
  to avoid problems with SD-FF cards in case the user switches to the "ST:TNG" or
  "Classic" skin.
2013-03-10 16:47:38 +01:00

112 lines
3.9 KiB
Perl
Executable File

#!/usr/bin/perl
# A simple EPG to HTML converter
#
# Converts the EPG data written by 'vdr' into the file /video/epg.data
# into a simple HTML programme listing, consisting of one file per channel
# plus an 'index.htm' file. All output files are written into the current
# directory.
#
# Usage: epg2html < /video/epg.data
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: epg2html 2.2 2013/03/04 13:02:20 kls Exp $
@Index = ();
($Charset = $ENV{LANG}) =~ s/^[^.]*\.?(.*)/$1/;
$Charset = "utf-8" unless $Charset || $ENV{LANG} == 'C';
sub GetDay
{
return substr(localtime(shift), 0, 10);
}
sub GetTime
{
return substr(localtime(shift), 11, 5);
}
sub Tags
{
my $s = shift;
$s =~ s/\&/&amp;/g;
$s =~ s/</&lt;/g;
$s =~ s/>/&gt;/g;
return $s;
}
while (<>) {
chomp;
if (/^C ([^ ]+) *(.*)/) {
my $Channel = $2;
(my $Page = $Channel) =~ y/\/ /-_/;
$Page .= ".htm";
$Channel = Tags($Channel);
push(@Index, qq{<a href="$Page">$Channel</a><br>\n});
my %Events = ();
while (<>) {
if (/^E (.*?) (.*?) ([^ ]*)/) {
(my $Time, $Duration) = ($2, $3);
my $Title = "", $Subtitle = "", $Description = "", $Vps = 0;
while (<>) {
if (/^T (.*)/) { $Title = Tags($1); }
elsif (/^S (.*)/) { $Subtitle = Tags($1); }
elsif (/^D (.*)/) { $Description = Tags($1); $Description =~ s/\|/<br>/g; }
elsif (/^V (.*)/) { $Vps = $1; }
elsif (/^e/) {
$Events{$Time} = [($Duration, $Title, $Subtitle, $Description, $Vps)];
last;
}
}
}
elsif (/^c/) {
my @Schedule = ();
my $Day = "";
for $t (sort keys %Events) {
(my $Duration, $Title, $Subtitle, $Description, $Vps) = @{$Events{$t}};
my $d = GetDay($t);
if ($d ne $Day) {
push(@Schedule, "</table>\n") if ($Day && @Schedule);
push(@Schedule, "<h2>$d</h2>\n");
push(@Schedule, "<table cellspacing=2>\n");
$Day = $d;
}
my $Entry = $Title;
$Entry .= "<br><i>$Subtitle</i>" if $Subtitle;
$Entry .= "<br>$Description" if $Description;
$Entry .= "<br>(VPS = " . scalar localtime($Vps) . ")" if $Vps && $Vps != $t;
push(@Schedule, "<tr><td valign=top>" . GetTime($t) . "</td><td>$Entry</td></tr>\n");
}
push(@Schedule, "</table>\n") if (@Schedule);
open(PAGE, ">$Page") or die "$Page: $!\n";
print PAGE "<html>\n";
print PAGE "<head>\n";
print PAGE "<title>$Channel</title>\n";
print PAGE "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=$Charset\">\n";
print PAGE "</head>\n";
print PAGE "<body>\n";
print PAGE "<h1>$Channel</h1>\n";
print PAGE @Schedule;
print PAGE "</body>\n";
print PAGE "</html>\n";
close(PAGE);
last;
}
}
}
}
open(INDEX, ">index.htm") or die "index.htm: $!\n";
print INDEX "<html>\n";
print INDEX "<head>\n";
print INDEX "<title>EPG Index</title>\n";
print INDEX "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=$Charset\">\n";
print INDEX "</head>\n";
print INDEX "<body>\n";
print INDEX sort { lc($a) cmp lc($b) } @Index;
print INDEX "</body>\n";
print INDEX "</html>\n";
close(INDEX);