liveblog 1.0.4 → 1.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9163bbe970094e38ddb40af515abdd8a9daf6a60
4
- data.tar.gz: b996abf14fd4b18ad55b206a384f261af7ce97c5
3
+ metadata.gz: 25857725f9516a9bae9edad4ca0e413093d74380
4
+ data.tar.gz: eea926eb619a669b4950ff544e399ffe9b5c3616
5
5
  SHA512:
6
- metadata.gz: 8097f7d97ffa18d1426cf1884b0011b3ea3762514e561c70cb56ca231ef0cd1fb2ab7a976b930b2e73aaa0bb3109fd935b1cade86ae06ad6c7516be739fbcc6e
7
- data.tar.gz: 57eded9c5203d106dacb07a699861bea67ef16b7af0700d66d50a99bd4651772e22ac49d3d776059c33fe9177bad05f5682a1bf12ed07bd706af704764bd3900
6
+ metadata.gz: 31b88c3f70e5ad247427029d4225bce071ac9b8f3eb634c0f6e04927a63561bd3a02ff14d3093193d345ef77ae3be24a6aa5a8f5fb07750db741ce2b68c9d503
7
+ data.tar.gz: 56e1c0c05dab8110e0b02f88512d1cc3ada28c8e7606ace587efdc6d3fb1ac6359f123ad405e2d879895c7ca39c557ca84427b0c7c6ae490c311b0f2767df78b
@@ -1 +1 @@
1
- ����]���ǖ�e��f��:}biJy �`��Z��]�T�����c��ʸ"��M��(}���>�^/��鯬��Li��� ,,5y��DH�"ٽ�\��Ά���g�ͤ;}��+���.;:C#��*
1
+ =1�?]oS�ٌ�x{|�b�!؂4�^��K~#y����>�)TyPRq���QF����f������4��C��w v���Ҭ1�9�u3
data.tar.gz.sig CHANGED
Binary file
@@ -3,9 +3,8 @@
3
3
  # file: liveblog.rb
4
4
 
5
5
  require 'time'
6
- require 'dynarex'
7
6
  require 'fileutils'
8
- require 'martile'
7
+ require 'dxsectionx'
9
8
  require 'simple-config'
10
9
  require 'rexle-diff'
11
10
 
@@ -347,35 +346,10 @@ EOF
347
346
  summary.add tags
348
347
 
349
348
  domain = @urlbase[/https?:\/\/([^\/]+)/,1].split('.')[-2..-1].join('.')
349
+ dxsx = DxSectionX.new(doc, domain: domain, xsl_url: @xsl_url)
350
+ xmldoc = dxsx.to_doc
350
351
 
351
- doc.root.xpath('records/section/x') do |x|
352
-
353
- s = "=%s\n%s\n=" % [x.text.lines.first[/#\w+$/], x.text.unescape]
354
-
355
- html = Martile.new(s, ignore_domainlabel: domain).to_html
356
-
357
- e = x.parent
358
- x.delete
359
- doc2 = Rexle.new(html)
360
-
361
- h1 = doc2.root.element('h1')
362
- details = Rexle::Element.new('details')
363
- details.attributes[:open] = 'open'
364
- summary = Rexle::Element.new('summary')
365
- summary.add h1
366
-
367
- details.add summary
368
- doc2.root.xpath('.').each {|x| details.add x }
369
- doc2.root.add details
370
- e.add doc2.root
371
- end
372
-
373
- doc.instructions << [
374
- 'xml-stylesheet',
375
- "title='XSL_formatting' type='text/xsl' href='#{@xsl_url}'"
376
- ]
377
-
378
- File.write formatted2_filepath, doc.xml(pretty: true)
352
+ File.write formatted2_filepath, xmldoc.xml(pretty: true)
379
353
 
380
354
  # save the related CSS file locally if the file doesn't already exist
381
355
  if not File.exists? 'liveblog.css' then
@@ -388,7 +362,7 @@ EOF
388
362
 
389
363
  unless File.exists? raw_formatted_filepath then
390
364
 
391
- doc2 = doc.root.deep_clone
365
+ doc2 = xmldoc.root.deep_clone
392
366
 
393
367
  doc2.root.traverse do |node|
394
368
  node.attributes[:created] = Time.now.to_s
@@ -30,7 +30,7 @@ xml version="1.0" encoding="utf-8"?>
30
30
 
31
31
  <div id='summary'>
32
32
  <ul>
33
- <xsl:for-each select="records/section/section">
33
+ <xsl:for-each select="records/section">
34
34
  <!--<xsl:sort select='../@id' order='descending'/>-->
35
35
  <li><a href='#{@id}'><xsl:value-of select='details/summary/h1'/></a></li>
36
36
  </xsl:for-each>
@@ -68,7 +68,7 @@ xml version="1.0" encoding="utf-8"?>
68
68
  <div style='clear:both'/>
69
69
  <xsl:for-each select="records/section">
70
70
  <!--<xsl:sort select='@id' order='descending'/>-->
71
- <xsl:copy-of select='section'/>
71
+ <xsl:copy-of select='.'/>
72
72
 
73
73
  </xsl:for-each>
74
74
 
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
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,48 +31,28 @@ cert_chain:
31
31
  WoOSxvsTN7qoA8F0W4mkDpf+HhHxBOLTPykcHMIlx2gILLnNraaZ1rJlZAqWABGj
32
32
  v8lGgeeqqjd5QA==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-07-01 00:00:00.000000000 Z
34
+ date: 2015-09-26 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
- name: dynarex
37
+ name: dxsectionx
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '1.5'
42
+ version: '0.1'
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 1.5.23
45
+ version: 0.1.4
46
46
  type: :runtime
47
47
  prerelease: false
48
48
  version_requirements: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: '1.5'
52
+ version: '0.1'
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 1.5.23
56
- - !ruby/object:Gem::Dependency
57
- name: martile
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '0.5'
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: 0.5.20
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: !ruby/object:Gem::Requirement
69
- requirements:
70
- - - "~>"
71
- - !ruby/object:Gem::Version
72
- version: '0.5'
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: 0.5.20
55
+ version: 0.1.4
76
56
  - !ruby/object:Gem::Dependency
77
57
  name: simple-config
78
58
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
142
  version: '0'
163
143
  requirements: []
164
144
  rubyforge_project:
165
- rubygems_version: 2.4.6
145
+ rubygems_version: 2.4.8
166
146
  signing_key:
167
147
  specification_version: 4
168
148
  summary: Uses the Dynarex gem to create a daily live blog. Convenient for grouping
metadata.gz.sig CHANGED
Binary file