/[mplayer-eee-tv]/program/xmltv.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /program/xmltv.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 18 by dpavlin, Sat Oct 31 13:10:05 2009 UTC revision 24 by dpavlin, Sat Oct 31 14:35:51 2009 UTC
# Line 13  my $tv = XMLin( 'tv.xml', Line 13  my $tv = XMLin( 'tv.xml',
13  warn dump $tv;  warn dump $tv;
14    
15  print qq|  print qq|
16    <html>
17    <head>
18    <meta charset=utf-8>
19    
20  <style type="text/css">  <style type="text/css">
21    
22    td {
23            font-family:sans-serif;
24            vertical-align: top;
25    }
26    
27  ,hour {  ,hour {
28          border-top: 1px dashed #ccc;          border-top: 1px dashed #ccc;
29  }  }
30    
31    .hhmm {
32            font-size: 50%;
33            color: #888;
34            float: right;
35    }
36    
37  </style>  </style>
38    
39    </head>
40    <body>
41    
42  <table border=1 >  <table border=1 >
43  <tr><td></td>  <tr><td></td>
44  |;  |;
# Line 68  foreach my $hh ( 0 .. 23 ) { Line 85  foreach my $hh ( 0 .. 23 ) {
85                  foreach my $c ( @channels ) {                  foreach my $c ( @channels ) {
86                          if ( $programs->{$c}->[0]->[0] == $hh * 60 + $mm ) {                          if ( $programs->{$c}->[0]->[0] == $hh * 60 + $mm ) {
87                                  my $p = shift @{ $programs->{$c} };                                  my $p = shift @{ $programs->{$c} };
88                                  my $span = $p->[1] - 1;                                  my $span = $p->[1]; # - 1;
89                                  push @td, join(''  
90                                          , qq|<td rowspan=$span>|                                  my $html = '';
91                                          , join("\n"                                  $html = join("\n"
92                                                  , qq|<span class="hhmm">$hhmm</span>|                                          , qq|<span class="hhmm">$hhmm<br>$span</span>|
93                                                  , $p->[2]->{title}->{content} || '-'                                          , $p->[2]->{title}->{content}
94                                                  , "<!-- $c -->"                                          , "<!-- $c -->"
95                                          )                                  ) if $p->[2];
96                                          . qq|</td>|  
97                                  );                                  push @td, qq|<td rowspan=$span>$html</td>|;
98                          }                          }
99                  }                  }
100    
# Line 89  foreach my $hh ( 0 .. 23 ) { Line 106  foreach my $hh ( 0 .. 23 ) {
106    
107  print qq|  print qq|
108  </table>  </table>
109    
110    </body>
111    
112    </html>
113  |;  |;

Legend:
Removed from v.18  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.26