xmltv2html 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +13 -0
- data/bin/xmltv2html.rb +22 -12
- data/xmltv2htmlrc +3 -0
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
------------------------------------------------------------------------
|
2
|
+
r191 | kvh | 2006-02-19 17:01:20 -0500 (Sun, 19 Feb 2006) | 1 line
|
3
|
+
Changed paths:
|
4
|
+
M /trunk/bin/xmltv2html.rb
|
5
|
+
M /trunk/xmltv2htmlrc
|
6
|
+
|
7
|
+
Allow the favorite list to be sorted by programme start date
|
8
|
+
------------------------------------------------------------------------
|
9
|
+
r190 | kvh | 2006-02-19 16:42:41 -0500 (Sun, 19 Feb 2006) | 1 line
|
10
|
+
Changed paths:
|
11
|
+
M /trunk/bin/xmltv2html.rb
|
12
|
+
|
13
|
+
add channel to favorite list output
|
14
|
+
------------------------------------------------------------------------
|
2
15
|
r189 | kvh | 2006-02-13 17:09:18 -0500 (Mon, 13 Feb 2006) | 1 line
|
3
16
|
Changed paths:
|
4
17
|
M /trunk/bin/xmltv2html.rb
|
data/bin/xmltv2html.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
#
|
5
5
|
# xmltv2html.rb - A Ruby script to transform the XMLTV output into HTML.
|
6
6
|
#
|
7
|
-
# Version : 0.7.
|
7
|
+
# Version : 0.7.1
|
8
8
|
# Author : Kurt V. Hindenburg <public@kurt.hindenburg.name>
|
9
9
|
#
|
10
10
|
# Copyright (C) 2003, 2004, 2005 Kurt V. Hindenburg
|
@@ -75,8 +75,8 @@ require 'time'
|
|
75
75
|
require 'set'
|
76
76
|
require 'ostruct'
|
77
77
|
|
78
|
-
XMLTV2HTML_VERSION="0.7.
|
79
|
-
XMLTV2HTML_DATE="Feb
|
78
|
+
XMLTV2HTML_VERSION="0.7.1"
|
79
|
+
XMLTV2HTML_DATE="Feb 20, 2006"
|
80
80
|
|
81
81
|
class Time
|
82
82
|
class << self
|
@@ -135,6 +135,7 @@ module XMLTV2HTML
|
|
135
135
|
:use_favorites => false,
|
136
136
|
:output_favorites => false,
|
137
137
|
:favorites_list => [],
|
138
|
+
:favorites_sort_by_date => true,
|
138
139
|
:css_filename => 'xmltv2html.css',
|
139
140
|
:categories => {},
|
140
141
|
:output_date_in_time => false,
|
@@ -256,7 +257,7 @@ EOF
|
|
256
257
|
|
257
258
|
class Programme
|
258
259
|
attr_reader :title, :subtitle, :span, :times, :desc, :rating, :category
|
259
|
-
attr_reader :previouslyShown, :spanSlots, :startSlot
|
260
|
+
attr_reader :previouslyShown, :spanSlots, :startSlot, :channelid
|
260
261
|
attr_accessor :startTimeStr, :stopTimeStr
|
261
262
|
attr_accessor :startTime, :stopTime, :popupIndex
|
262
263
|
|
@@ -385,7 +386,6 @@ end
|
|
385
386
|
class Channel
|
386
387
|
attr_reader(:name, :id, :fullname)
|
387
388
|
attr_accessor(:programmes)
|
388
|
-
# attr_reader(:programmes)
|
389
389
|
attr_accessor(:totalSpan)
|
390
390
|
|
391
391
|
def initialize(id, fn)
|
@@ -1244,20 +1244,30 @@ class Html
|
|
1244
1244
|
end
|
1245
1245
|
|
1246
1246
|
def output_favorites_list(fav_list)
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1247
|
+
if @@options[:favorites_sort_by_date]
|
1248
|
+
fav_list = fav_list.sort! { |a, b| a.startTime<=>b.startTime }
|
1249
|
+
else
|
1250
|
+
fav_list = fav_list.sort! { |a, b| a.title<=>b.title }
|
1251
|
+
end
|
1252
|
+
|
1250
1253
|
print '<br><br>'; nl
|
1251
1254
|
print '<table width="100%" border="3" cellpadding="3">'; nl
|
1252
|
-
print '<tr><td colspan="
|
1253
|
-
print '<tr><td width="
|
1254
|
-
print '<td width="
|
1255
|
-
print '<td width="
|
1255
|
+
print '<tr><td colspan="4" align="center">Favorites</td></tr>'; nl
|
1256
|
+
print '<tr><td width="15%" align="center" nowrap>Channel</td>';
|
1257
|
+
print '<td width="45%" align="center" nowrap>Title</td>';
|
1258
|
+
print '<td width="20%" align="center">Start</td>';
|
1259
|
+
print '<td width="20%" align="center">Stop</td>';
|
1256
1260
|
print '</tr>'; nl
|
1257
1261
|
|
1262
|
+
channels = Channels.instance
|
1263
|
+
|
1258
1264
|
fav_list.each { |p|
|
1259
1265
|
print '<tr>'; nl
|
1260
1266
|
|
1267
|
+
print '<td class="channel">'; nl
|
1268
|
+
print channels[p.channelid].fullname
|
1269
|
+
print '</td>'; nl
|
1270
|
+
|
1261
1271
|
outputProgramme(p, p.popupIndex, 1)
|
1262
1272
|
|
1263
1273
|
print '<td align="center">'; nl
|
data/xmltv2htmlrc
CHANGED
@@ -28,6 +28,9 @@
|
|
28
28
|
# Print out list of favorites beneath the listings?
|
29
29
|
#:output_favorites: false
|
30
30
|
|
31
|
+
# If true, sort favorite list by programme's start time (else by title)
|
32
|
+
#:favorites_sort_by_date: true
|
33
|
+
|
31
34
|
# Name of CSS file
|
32
35
|
#:css_filename: 'xmltv2html.css'
|
33
36
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: xmltv2html
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.7.
|
7
|
-
date: 2006-02-
|
6
|
+
version: 0.7.1
|
7
|
+
date: 2006-02-19 00:00:00 -05:00
|
8
8
|
summary: xmltv2html generates a HTML page from the output of XMLTV.
|
9
9
|
require_paths:
|
10
10
|
- lib
|