liveblog 1.2.3 → 1.2.4
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 +0 -0
- data.tar.gz.sig +0 -0
- data/lib/liveblog.rb +37 -16
- metadata +4 -4
- 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: 350a9386bab14d5eaddec10a57a0be17762bf5bb
|
4
|
+
data.tar.gz: 842ce261cc5f41f69cb9aa67df6187eba07e4292
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a8e040de9b3d2989cd46b5c2a07168c380d49da7ebcdbcd3685fdca40e864449fbd5d71945bc327b83a361ab2ca1525b249de6de69b854651da1465aee49819
|
7
|
+
data.tar.gz: d7778eebd82c70ce7ad0811f5f2094ccbeda2a0a49d257475298379ac6c46b422033fce192913380cba642d7dd895ea15f26077fd00fdb3749ccc6bdc2f8eaf5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/liveblog.rb
CHANGED
@@ -54,26 +54,15 @@ class LiveBlog
|
|
54
54
|
|
55
55
|
else
|
56
56
|
|
57
|
-
|
58
|
-
link_today()
|
59
|
-
|
60
|
-
@plugins.each do |x|
|
61
|
-
|
62
|
-
if x.respond_to? :on_new_day then
|
63
|
-
|
64
|
-
yesterdays_index_file = File.join(path(@d-1), 'index.xml')
|
65
|
-
|
66
|
-
x.on_new_day(yesterdays_index_file, urlpath(@d-1))
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
57
|
+
new_day()
|
71
58
|
|
72
59
|
end
|
73
60
|
|
74
61
|
|
75
62
|
end
|
76
63
|
|
64
|
+
# add a single line entry
|
65
|
+
#
|
77
66
|
def add_entry(raw_entry)
|
78
67
|
|
79
68
|
entry, hashtag = raw_entry.split(/\s*#(?=\w+$)/)
|
@@ -147,6 +136,27 @@ class LiveBlog
|
|
147
136
|
render_html doc, @d-1
|
148
137
|
|
149
138
|
end
|
139
|
+
|
140
|
+
def new_day(date: Date.today)
|
141
|
+
|
142
|
+
@d = date
|
143
|
+
dxfile = File.join(path(), 'index.xml')
|
144
|
+
|
145
|
+
new_file()
|
146
|
+
link_today()
|
147
|
+
|
148
|
+
@plugins.each do |x|
|
149
|
+
|
150
|
+
if x.respond_to? :on_new_day then
|
151
|
+
|
152
|
+
yesterdays_index_file = File.join(path(@d-1), 'index.xml')
|
153
|
+
|
154
|
+
x.on_new_day(yesterdays_index_file, urlpath(@d-1))
|
155
|
+
|
156
|
+
end
|
157
|
+
|
158
|
+
end
|
159
|
+
end
|
150
160
|
|
151
161
|
def new_file(s=nil)
|
152
162
|
|
@@ -200,6 +210,11 @@ EOF
|
|
200
210
|
|
201
211
|
alias import new_file
|
202
212
|
|
213
|
+
def raw_view(tag)
|
214
|
+
r = self.find_hashtag tag
|
215
|
+
r.x if r
|
216
|
+
end
|
217
|
+
|
203
218
|
def save()
|
204
219
|
|
205
220
|
@dx.save File.join(path(), 'index.xml')
|
@@ -213,10 +228,16 @@ EOF
|
|
213
228
|
|
214
229
|
end
|
215
230
|
|
231
|
+
def update(val)
|
232
|
+
self.method(val[/^<\?dynarex/] ? :import : :update_entry).call val
|
233
|
+
end
|
234
|
+
|
235
|
+
# update a page (contains multiple liveblog entries for a section) entry
|
236
|
+
#
|
216
237
|
def update_entry(raw_entry)
|
217
238
|
|
218
239
|
hashtag = raw_entry.lines.first[/#(\w+)$/,1]
|
219
|
-
|
240
|
+
|
220
241
|
record_found = find_hashtag hashtag
|
221
242
|
|
222
243
|
if record_found then
|
@@ -583,4 +604,4 @@ EOF
|
|
583
604
|
nil
|
584
605
|
end
|
585
606
|
end
|
586
|
-
end
|
607
|
+
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: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
5s8qc8N6iJi3jGcarS1hVkhlWGshAZx1T0n/Q27m1S0GoVUebJYFJxqaZqL5FO/v
|
32
32
|
NonZ4ByUi+SaTg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2017-01-18 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dxsectionx
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: 0.5.4
|
116
116
|
description:
|
117
|
-
email: james@
|
117
|
+
email: james@jamesrobertson.eu
|
118
118
|
executables: []
|
119
119
|
extensions: []
|
120
120
|
extra_rdoc_files: []
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.6.8
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Uses the Dynarex gem to create a daily live blog. Convenient for grouping
|
metadata.gz.sig
CHANGED
Binary file
|