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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79afa25caa7c65612e10eb38f3935f8b32586d33
4
- data.tar.gz: 2506113a16972e664bbd74a47b6240556f0e6848
3
+ metadata.gz: 83efd9df65ca44c65b08d4a9bd617059e4e29076
4
+ data.tar.gz: f1bff10a4ce27e703bad969da987b077b6c12d60
5
5
  SHA512:
6
- metadata.gz: c2661abcc3e7c5b7c04fe05156cf8da52f7bebe22753f86f5b83b1d229d79a93a8058d428a3c00aade19bdadecddc0ec78b9be0bd08f98027d82f7bda0e2640d
7
- data.tar.gz: d80564831febb0f14e3b06007df525c5dd1dad77ca95a255d2844e0832cc784ed6033d08d0b7df30eabf6f8b49c2b1d6c60e402158c002197823c46cb6bd1408
6
+ metadata.gz: 7beec6ca2ce4d6dbbea4eb1542f28b218f8fa52dc6586afcdae536d304544a0c548f076e166c5051e4ce3431f86d812154117ed715990858ad5ce2dd9f145029
7
+ data.tar.gz: 199867fd93379fd081c2ef530e13cfcbff979c38640276117e722d1b4502920a7a59f1158d97a26cbf8dff965a2a16d5f1688043f257265790feb2f2883aa052
@@ -1,2 +1,2 @@
1
- 9���Q^9E|��dY����?�.raxEu��EL�`ڊ`����,��ǐM�� ������|��0^7�­��x:�����p2D~t�!�"|��?������=L_s��YߝXZ��E
2
- $ҳqn�%KȳN�:�g�`�w����~
1
+ $n����6u7\/�yx+���Lo9z����RP#"|���Oe�פ�Z��䀲�.1pgu���N�˪�������w�sA�xо\7d5���^Bf�NOw�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
@@ -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
- tags.add Rexle::Element.new('tag').add_text x.lines.first[/#(\w+)$/,1]\
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.12
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-10-16 00:00:00.000000000 Z
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