xmltv2html 0.5.4 → 0.5.5
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 +38 -0
- data/bin/xmltv2html.rb +55 -12
- data/xmltv2htmlrc +2 -0
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -1,4 +1,42 @@
|
|
1
1
|
------------------------------------------------------------------------
|
2
|
+
r143 | kvh | 2005-09-16 17:21:44 -0500 (Fri, 16 Sep 2005) | 1 line
|
3
|
+
Changed paths:
|
4
|
+
M /trunk/bin/xmltv2html.rb
|
5
|
+
|
6
|
+
check for empty favorites_list before outputing table
|
7
|
+
------------------------------------------------------------------------
|
8
|
+
r142 | kvh | 2005-09-12 09:40:53 -0500 (Mon, 12 Sep 2005) | 1 line
|
9
|
+
Changed paths:
|
10
|
+
M /trunk/bin/xmltv2html.rb
|
11
|
+
|
12
|
+
update favorites list output
|
13
|
+
------------------------------------------------------------------------
|
14
|
+
r141 | kvh | 2005-09-12 00:06:45 -0500 (Mon, 12 Sep 2005) | 1 line
|
15
|
+
Changed paths:
|
16
|
+
M /trunk/bin/xmltv2html.rb
|
17
|
+
|
18
|
+
adding the ability to list all the favorites beneath the normal listings
|
19
|
+
------------------------------------------------------------------------
|
20
|
+
r140 | kvh | 2005-09-11 23:20:22 -0500 (Sun, 11 Sep 2005) | 1 line
|
21
|
+
Changed paths:
|
22
|
+
M /trunk/bin/xmltv2html.rb
|
23
|
+
|
24
|
+
correct title text
|
25
|
+
------------------------------------------------------------------------
|
26
|
+
r139 | kvh | 2005-09-10 17:04:32 -0500 (Sat, 10 Sep 2005) | 1 line
|
27
|
+
Changed paths:
|
28
|
+
D /trunk/create_dists
|
29
|
+
A /trunk/make_distribution_files (from /trunk/create_dists:138)
|
30
|
+
M /trunk/xmltv2htmlrc
|
31
|
+
|
32
|
+
rename script to make distribution files
|
33
|
+
------------------------------------------------------------------------
|
34
|
+
r138 | kvh | 2005-09-10 17:01:30 -0500 (Sat, 10 Sep 2005) | 1 line
|
35
|
+
Changed paths:
|
36
|
+
M /trunk/create_dists
|
37
|
+
|
38
|
+
add depot for distribution files
|
39
|
+
------------------------------------------------------------------------
|
2
40
|
r137 | kvh | 2005-09-10 11:21:43 -0500 (Sat, 10 Sep 2005) | 1 line
|
3
41
|
Changed paths:
|
4
42
|
M /trunk/bin/xmltv2html.rb
|
data/bin/xmltv2html.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# xmltv2html.rb - A Ruby script to tranform the XMLTV output into HTML.
|
4
4
|
#
|
5
|
-
# Version : 0.5.
|
5
|
+
# Version : 0.5.5
|
6
6
|
# Author : Kurt V. Hindenburg <public@kurt.hindenburg.name>
|
7
7
|
#
|
8
8
|
# Copyright (C) 2003, 2004, 2005 Kurt V. Hindenburg
|
@@ -73,8 +73,8 @@ require "rexml/document"
|
|
73
73
|
require 'singleton'
|
74
74
|
require 'time'
|
75
75
|
|
76
|
-
XMLTV2HTML_VERSION="0.5.
|
77
|
-
XMLTV2HTML_DATE="Sep
|
76
|
+
XMLTV2HTML_VERSION="0.5.5"
|
77
|
+
XMLTV2HTML_DATE="Sep 17, 2005"
|
78
78
|
|
79
79
|
module Xmltv2Html
|
80
80
|
|
@@ -118,8 +118,8 @@ class Config
|
|
118
118
|
attr_accessor(:start_date, :stop_date)
|
119
119
|
attr_accessor(:days, :total_hours, :total_span)
|
120
120
|
attr_accessor(:url_next, :url_prev)
|
121
|
-
|
122
121
|
attr_accessor(:start_time, :stop_time)
|
122
|
+
attr_accessor(:output_favorites)
|
123
123
|
|
124
124
|
def initialize
|
125
125
|
@opts = {}
|
@@ -172,6 +172,8 @@ class Config
|
|
172
172
|
"The Shield", "Law & Order: Criminal Intent",
|
173
173
|
"Charmed", "The West Wing"
|
174
174
|
]
|
175
|
+
# Print out list of favorites beneath the listings?
|
176
|
+
@output_favorites = false
|
175
177
|
|
176
178
|
# Name of CSS file
|
177
179
|
@css_filename = 'xmltv2html.css'
|
@@ -405,13 +407,13 @@ class Programme
|
|
405
407
|
@spanSlots = @stopSlot - @startSlot
|
406
408
|
end
|
407
409
|
|
408
|
-
def start_time
|
409
|
-
@times.start_time
|
410
|
-
end
|
410
|
+
# def start_time
|
411
|
+
# @times.start_time
|
412
|
+
# end
|
411
413
|
|
412
|
-
def stop_time
|
413
|
-
@times.stop_time
|
414
|
-
end
|
414
|
+
# def stop_time
|
415
|
+
# @times.stop_time
|
416
|
+
# end
|
415
417
|
|
416
418
|
def to_s
|
417
419
|
@title
|
@@ -667,7 +669,7 @@ class XmlTV
|
|
667
669
|
@time_first = t1.strftime("%a %b %d %I:%M %p")
|
668
670
|
@time_last = t2.strftime("%a %b %d %I:%M %p %Z")
|
669
671
|
|
670
|
-
if (t1.hour > 19) and (t2.hour < 05)
|
672
|
+
if ( (t1.hour == 0) or (t1.hour > 19) ) and (t2.hour < 05)
|
671
673
|
t3 = t1 + (5 * 3600)
|
672
674
|
@top_title += t3.strftime("%A %b %d")
|
673
675
|
@HTML_title = @top_title
|
@@ -870,6 +872,7 @@ class XMLTV2HTML
|
|
870
872
|
def generateHTML
|
871
873
|
sindex =-1
|
872
874
|
times_counter = 1
|
875
|
+
favorites_list = []
|
873
876
|
|
874
877
|
@out.dates = @dates
|
875
878
|
|
@@ -898,7 +901,13 @@ class XMLTV2HTML
|
|
898
901
|
when "P" # Programme
|
899
902
|
sindex += 1
|
900
903
|
pi += 1
|
901
|
-
|
904
|
+
prog = c.programme_at(pi)
|
905
|
+
@out.outputProgramme(prog, sindex, span)
|
906
|
+
# @out.outputProgramme(c.programme_at(pi), sindex, span)
|
907
|
+
if $params.use_favorites and $params.output_favorites and $params.favorites.has_key?(prog.title)
|
908
|
+
#$stderr.print "found a fav #{prog.title}\n"
|
909
|
+
favorites_list << prog
|
910
|
+
end
|
902
911
|
when "Q" # Use previous Programme's info
|
903
912
|
@out.outputProgramme(c.programme_at(pi), sindex, span)
|
904
913
|
when "C"
|
@@ -914,6 +923,9 @@ class XMLTV2HTML
|
|
914
923
|
}
|
915
924
|
|
916
925
|
@out.table_end
|
926
|
+
|
927
|
+
@out.output_favorites_list(favorites_list) if not favorites_list.empty?
|
928
|
+
|
917
929
|
@out.text_after_table
|
918
930
|
@out.footer
|
919
931
|
end
|
@@ -1205,6 +1217,37 @@ class Html
|
|
1205
1217
|
print '</td>'; nl
|
1206
1218
|
end
|
1207
1219
|
|
1220
|
+
def output_favorites_list(fav_list)
|
1221
|
+
fav_list = fav_list.sort! { |a, b| a.title<=>b.title }
|
1222
|
+
|
1223
|
+
|
1224
|
+
print '<br><br>'; nl
|
1225
|
+
print '<table width="100%" border="3" cellpadding="3">'; nl
|
1226
|
+
print '<tr><td colspan="3" align="center">Favorites</td></tr>'; nl
|
1227
|
+
print '<tr><td width="50%" align="center" nowrap>Title</td>';
|
1228
|
+
print '<td width="25%" align="center">Start</td>';
|
1229
|
+
print '<td width="25%" align="center">Stop</td>';
|
1230
|
+
print '</tr>'; nl
|
1231
|
+
|
1232
|
+
fav_list.each { |p|
|
1233
|
+
print '<tr>'; nl
|
1234
|
+
|
1235
|
+
outputProgramme(p, p.popupIndex, 1)
|
1236
|
+
|
1237
|
+
print '<td align="center">'; nl
|
1238
|
+
print p.times.fullStartTime.strftime("%a %b %d %I:%M %p")
|
1239
|
+
print '</td>'; nl
|
1240
|
+
|
1241
|
+
print '<td align="center">'; nl
|
1242
|
+
print p.times.fullStopTime.strftime("%a %b %d %I:%M %p")
|
1243
|
+
print '</td>'; nl
|
1244
|
+
|
1245
|
+
print '</tr>'; nl
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
print '</table>'; nl
|
1249
|
+
end
|
1250
|
+
|
1208
1251
|
def outputInfo
|
1209
1252
|
print '<br>'
|
1210
1253
|
print '<span class="info">'
|
data/xmltv2htmlrc
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
|
|
3
3
|
specification_version: 1
|
4
4
|
name: xmltv2html
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2005-09-
|
6
|
+
version: 0.5.5
|
7
|
+
date: 2005-09-16
|
8
8
|
summary: xmltv2html generates a HTML page from the output of XMLTV.
|
9
9
|
require_paths:
|
10
10
|
- lib
|