liveblog 0.9.5 → 0.9.7

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: 1da8265315540d267b4b9b257a39fc755d094edb
4
- data.tar.gz: 70fa63da647a60915b9700478c94f842da6e00ec
3
+ metadata.gz: 9c18e2dd45999314235b166cbe1dc8d4144b4436
4
+ data.tar.gz: 0f8e0d65dbb685d51a7f063cd5519df542401f85
5
5
  SHA512:
6
- metadata.gz: e17b6427398e0f9420c5f8d2db527da9e88fffc9ac094e6cc88b700544b4fec405b8bca7405af598cdbd6404b4b438e94edf4ab3d676cc9380925ef969c0c0d7
7
- data.tar.gz: 50f6da96d96ac90421da94a3ff718c2b994ebf403e3ff8a472930ce799e1810a8e00014cc5cd7dd255e496893752504b68b014dd215dbe37739bdedb5f5402a3
6
+ metadata.gz: b9724888887d000d1338d43be80dc4ecce5da69354a48306a3c7e041524a6f1c46a72fed9fa489411b40af1e0ec72bfb46921c6968b862ba63af2b8c1cafb784
7
+ data.tar.gz: 30f81c753baeccb696716c3c2a74cfb73d346e1e6f9ec2bdf1eb0faa29034f7d4fd3582d73b380111ec26378f9bc2b5beb547fea2629667753174f257276d195
@@ -1 +1 @@
1
- ^����!gj���;�&[hf������B��Ll�# ⱦ�!���gi%d�.�-ɍws���l�i�o^�Ӆ#O�2F�$J�c8�(4��o��w���G�U�Q6U��|3C��cTrH�fֈ�R��ݓ��vM��rB���|��S�:|yһZfvH���,~'f7AS�=<��4o��棢Nåx��� ��)�X���JW
1
+ q-�4��$������`U����0q@,���F��=���ěw�&������� �.w69�R#889t�|��]Ws��7y|��?��נ�d��
data.tar.gz.sig CHANGED
Binary file
@@ -170,10 +170,28 @@ EOF
170
170
  File.write File.join(path(), 'index.txt'), @dx.to_s
171
171
  save_html()
172
172
  save_rss()
173
- FileUtils.cp File.join(path(),'raw_formatted.xml'), File.join(path(),'raw_formatted.xml.bak')
173
+ save_frontpage()
174
+ FileUtils.cp File.join(path(),'raw_formatted.xml'), \
175
+ File.join(path(),'raw_formatted.xml.bak')
174
176
 
175
177
  end
176
178
 
179
+ def update_entry(entry)
180
+
181
+ hashtag = entry.lines.first[/#(\w+)$/,1]
182
+
183
+ record_found = find_hashtag hashtag
184
+
185
+ if record_found then
186
+ record_found.x = entry
187
+ save()
188
+ [true]
189
+ else
190
+ [false, 'record for #' + hashtag + ' not found.']
191
+ end
192
+
193
+ end
194
+
177
195
 
178
196
  private
179
197
 
@@ -445,5 +463,24 @@ EOF
445
463
 
446
464
  end
447
465
 
448
-
466
+ def save_frontpage()
467
+
468
+ # this method is still under developement. If the previous day's
469
+ # file doesn't exit it will simply return nil.
470
+ begin
471
+
472
+ doc, doc2 = [@d-1, @d].map do |d|
473
+
474
+ url = @urlbase + d.strftime("%Y/%b/%d/formatted.xml")
475
+ Rexle.new RXFHelper.read(url).first
476
+
477
+ end
478
+
479
+ doc2.root.add doc.root.element('records')
480
+ File.write 'formatted.xml', doc2.xml
481
+
482
+ rescue
483
+ nil
484
+ end
485
+ end
449
486
  end
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: 0.9.5
4
+ version: 0.9.7
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-04-13 00:00:00.000000000 Z
34
+ date: 2015-04-19 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dynarex
metadata.gz.sig CHANGED
Binary file