liveblog 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -2
- data.tar.gz.sig +0 -0
- data/lib/liveblog.rb +11 -6
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83efd9df65ca44c65b08d4a9bd617059e4e29076
|
4
|
+
data.tar.gz: f1bff10a4ce27e703bad969da987b077b6c12d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7beec6ca2ce4d6dbbea4eb1542f28b218f8fa52dc6586afcdae536d304544a0c548f076e166c5051e4ce3431f86d812154117ed715990858ad5ce2dd9f145029
|
7
|
+
data.tar.gz: 199867fd93379fd081c2ef530e13cfcbff979c38640276117e722d1b4502920a7a59f1158d97a26cbf8dff965a2a16d5f1688043f257265790feb2f2883aa052
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
$n����6�u7\/�yx+���L�o9z����R�P#"|���Oe�פ�Z��䀲�.1p�gu���N�˪�������w�sA�xо\7d�5���^Bf�N�O�w�B)�'κ�
|
2
|
+
S�H`�k������n��ڌ%���`�{��}Ԟ�V�k�x&Ău��1��1��tww�������:�ȷE4�+�B��:�����09��k�~��@�k�2,6s�V��m�y��&�y�D��
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/liveblog.rb
CHANGED
@@ -54,7 +54,7 @@ class LiveBlog
|
|
54
54
|
|
55
55
|
new_file()
|
56
56
|
link_today()
|
57
|
-
|
57
|
+
|
58
58
|
@plugins.each do |x|
|
59
59
|
|
60
60
|
if x.respond_to? :on_new_day then
|
@@ -114,7 +114,7 @@ class LiveBlog
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def initialize_plugins(plugins)
|
117
|
-
|
117
|
+
|
118
118
|
plugins.inject([]) do |r, plugin|
|
119
119
|
|
120
120
|
name, settings = plugin
|
@@ -201,6 +201,7 @@ EOF
|
|
201
201
|
def save()
|
202
202
|
|
203
203
|
@dx.save File.join(path(), 'index.xml')
|
204
|
+
|
204
205
|
File.write File.join(path(), 'index.txt'), @dx.to_s
|
205
206
|
save_html()
|
206
207
|
save_rss()
|
@@ -339,14 +340,16 @@ EOF
|
|
339
340
|
|
340
341
|
tags = Rexle::Element.new('tags')
|
341
342
|
|
342
|
-
doc.root.xpath('records/section/x/text()').each do |x|
|
343
|
-
|
343
|
+
doc.root.xpath('records/section/x/text()').each do |x|
|
344
|
+
|
345
|
+
tags.add Rexle::Element.new('tag').add_text x.lines.first.rstrip[/#(\w+)$/,1]\
|
344
346
|
.downcase
|
345
347
|
end
|
346
348
|
|
347
349
|
summary.add tags
|
348
350
|
|
349
351
|
domain = @urlbase[/https?:\/\/([^\/]+)/,1].split('.')[-2..-1].join('.')
|
352
|
+
|
350
353
|
dxsx = DxSectionX.new(doc, domain: domain, xsl_url: @xsl_url)
|
351
354
|
xmldoc = dxsx.to_doc
|
352
355
|
|
@@ -462,7 +465,7 @@ EOF
|
|
462
465
|
|
463
466
|
buffer = File.read File.join(path(), 'raw_formatted.xml')
|
464
467
|
doc = Rexle.new buffer
|
465
|
-
|
468
|
+
|
466
469
|
summary = doc.root.element 'summary'
|
467
470
|
|
468
471
|
dx = Dynarex.new 'liveblog[title,desc,link, pubdate, '\
|
@@ -472,17 +475,19 @@ EOF
|
|
472
475
|
dx.desc = 'Latest LiveBlog posts fetched from ' + @urlbase
|
473
476
|
dx.link = @urlbase
|
474
477
|
dx.order = 'descending'
|
478
|
+
|
475
479
|
dx.pubdate = rss_timestamp(summary.text('published'))
|
476
480
|
dx.lastbuild_date = Time.now.strftime("%a, %-d %b %Y %H:%M:%S %Z")
|
477
481
|
dx.lang = @rss_lang
|
478
482
|
|
479
483
|
doc.root.xpath('records/section/details').each do |x|
|
480
484
|
|
481
|
-
next if x.elements.empty?
|
485
|
+
next if x.elements.empty? or x.element('summary').elements.empty?
|
482
486
|
a = x.elements.to_a
|
483
487
|
h1 = a.shift.element('h1')
|
484
488
|
hashtag = h1.text[/#\w+$/]
|
485
489
|
|
490
|
+
next unless h1.attributes[:created]
|
486
491
|
created_at = rss_timestamp(h1.attributes[:created])
|
487
492
|
|
488
493
|
a.each do |node|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liveblog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
WoOSxvsTN7qoA8F0W4mkDpf+HhHxBOLTPykcHMIlx2gILLnNraaZ1rJlZAqWABGj
|
32
32
|
v8lGgeeqqjd5QA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-
|
34
|
+
date: 2015-12-03 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dxsectionx
|
metadata.gz.sig
CHANGED
Binary file
|