liveblog 0.8.4 → 0.8.5

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: 3fde61ea41e1d4fde7ee12cb61de65f01223144b
4
- data.tar.gz: d77d295303fc0d78e9ccf12de833a8363f9cbfcf
3
+ metadata.gz: b943c8e0010380870eca6cdfbb4287bda20585f0
4
+ data.tar.gz: 4ab0000d020ecdc8f512d31cbbd58edd7ed17604
5
5
  SHA512:
6
- metadata.gz: 07ede8db0a20b6e91a6409fe8d34e343c81aa6053e233da0678357923c0ba4487ff3380d1766e906126047d043badad3c5c44a2049721d7870186143f6528bf5
7
- data.tar.gz: 16b8ef8d5de82cf7d6ef98a67278efd4ca7893a363c78f198abea7fb579b14d3bd0272ec007ab3b61ff77c65a526d3dfc004a31889889a3709551a61c6f91287
6
+ metadata.gz: e0b88cd6c955cb3ebb166b02a1391b5c78664f8d3a75a1ae1f03c005fc207f5771f3ea08cfabe586b4055c65d647d5c6c4eb9cb315e9ab7fbfcb1890bc491ccb
7
+ data.tar.gz: 2ff7297c0d2953d504b8a88a373c035c7cb3c56487860e6d2200e3255eb733cbe5bf9d72d56be77c54670530208a68de79e4cf3454f90ef589b8144ed67ae429
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- \�]
2
- ^ �+�� ��F+ �]=9�?��¸)�.�X��P:����}�$��|�5H�����D�O�G�̢�h��a��\%�9� >Xg��P�<���d��R��Žk X�̯� G�ޗ,���[��f�рn����A�^N~n��5�&]N*n� u��Kdva��3�z����;���adgh*��C�Rw���>�V���^��?(d|���D�Y�%�
1
+ � ��O"��
2
+ )�^H��2 D �}
3
+ �(�4v� ��n˯Đ�*��Nj�5 �㬠X�z�;{�X`�� �:��H+�2�&�������{�
@@ -132,21 +132,38 @@ section {
132
132
  font-size: 1.2em;
133
133
  margin: 1.7em 0.7em 1.7em 1.7em; padding: 2.0em 2.0em 2.0em 2.0em;
134
134
  padding-bottom: 5em;
135
- max-width: 500px
135
+ max-width: 600px
136
136
  }
137
137
 
138
138
  section h1 {
139
139
  background-color: #D5A95D;
140
140
  /*color: #C34532;*/
141
- margin: 0.4em 0em 1.2em 0em;
142
- padding: 1em 1.5em;
141
+ margin: 0.4em 2.6em 1.0em 3.3em;
142
+ padding: 1em 1em 1em 1.4em;
143
+ }
144
+
145
+ section h1~time.border, section p time.border {
146
+ background-color: rgba(160,160,140, 0.2);
147
+ color: rgba(90, 140, 90, 0.9);
148
+ padding: 0.2em 0.6em;
149
+ }
150
+ section h1~time.border {
151
+ font-size: 0.9em;
152
+ margin: 0.1em; padding: 0.4em;
153
+ position: relative;
154
+ left: -20px; top: -71px;
143
155
  }
144
156
 
145
157
  section p {
146
158
  background-color: #ee3;
147
159
  background-color: transparent;
148
160
  font-size: 1.1em;
149
- margin: 0.4em 0.4em; padding: 0.6em 0.7em;
161
+ margin: 0.2em 1.95em 0.2em 1.55em; padding: 0.3em 2.2em 0.3em 3.6em;
162
+ }
163
+
164
+ section p time.border {
165
+ font-size: 0.8em;
166
+ margin: 0.1em 1.3em 0.4em -6.0em;
150
167
  }
151
168
 
152
169
  section p>code{
@@ -154,6 +171,16 @@ section {
154
171
  color: #486;
155
172
  padding: 0.1em 0.3em;
156
173
  }
174
+ section ul {
175
+ background-color: transparent;
176
+ font-size: 1.0em;
177
+ margin: 0.4em 1em 0.4em 3em;
178
+ padding: 0.7em 1em 0.7em 3.5em;
179
+ }
180
+ section ul li {
181
+ background-color: transparent;
182
+ }
183
+
157
184
 
158
185
  section a {
159
186
  background-color: transparent;
@@ -76,13 +76,13 @@ class LiveBlog
76
76
  #
77
77
  def link_today()
78
78
 
79
- newfilepath = File.join(path(@d-1), 'formatted.xml')
79
+ raw_formatted_filepath = File.join(path(@d-1), 'formatted.xml')
80
80
 
81
- return unless File.exists? newfilepath
81
+ return unless File.exists? raw_formatted_filepath
82
82
 
83
- doc = Rexle.new File.read(newfilepath)
83
+ doc = Rexle.new File.read(raw_formatted_filepath)
84
84
  doc.root.element('summary/next_day').text = static_urlpath()
85
- File.write newfilepath, doc.xml(pretty: true)
85
+ File.write raw_formatted_filepath, doc.xml(pretty: true)
86
86
 
87
87
  render_html doc, @d-1
88
88
 
@@ -173,12 +173,14 @@ EOF
173
173
 
174
174
  def save_html()
175
175
 
176
- newfilepath2 = File.join(path(), 'formatted2.xml')
177
- FileUtils.cp File.join(path(), 'index.xml'), newfilepath2
176
+ formatted2_filepath = File.join(path(), 'formatted2.xml')
177
+ FileUtils.cp File.join(path(), 'index.xml'), formatted2_filepath
178
178
 
179
- doc = Rexle.new File.read(newfilepath2)
179
+ doc = Rexle.new File.read(formatted2_filepath)
180
180
 
181
181
  summary = doc.root.element('summary')
182
+
183
+ summary.element('recordx_type').delete
182
184
 
183
185
  add summary, 'edit_url', "%s/%s" % [@edit_url, urlpath()]
184
186
  add summary, 'date', @d.strftime("%d-%b-%Y").upcase
@@ -226,27 +228,36 @@ EOF
226
228
  "title='XSL_formatting' type='text/xsl' href='#{@xsl_url}'"
227
229
  ]
228
230
 
229
- File.write newfilepath2, doc.xml(pretty: true)
231
+ File.write formatted2_filepath, doc.xml(pretty: true)
230
232
 
231
- render_html doc
233
+
232
234
 
233
235
  # save the related CSS file locally if the file doesn't already exist
234
236
  if not File.exists? 'liveblog.css' then
235
237
  FileUtils.cp File.join(File.dirname(__FILE__), 'liveblog.css'),\
236
238
  'liveblog.css'
237
239
  end
240
+
241
+ raw_formatted_filepath = File.join(path(), 'raw_formatted.xml')
242
+ formatted_filepath = File.join(path(), 'formatted.xml')
238
243
 
239
- # create the new timestamps for formatted.xml
240
-
241
- newfilepath = File.join(path(), 'raw_formatted.xml')
242
- newfilepath3 = File.join(path(), 'formatted.xml')
243
-
244
- (FileUtils.cp newfilepath2, newfilepath; return) unless File.exists? newfilepath
244
+ unless File.exists? raw_formatted_filepath then
245
+
246
+ doc2 = doc.root.deep_clone
245
247
 
246
- doc = RexleDiff.new(File.read(newfilepath), File.read(newfilepath2))\
248
+ doc2.root.traverse do |node|
249
+ node.attributes[:created] = Time.now.to_s
250
+ end
251
+
252
+ File.write raw_formatted_filepath, doc2.xml(pretty: true)
253
+
254
+ return
255
+ end
256
+
257
+ doc = RexleDiff.new(File.read(raw_formatted_filepath), File.read(formatted2_filepath))\
247
258
  .to_doc
248
- File.write newfilepath, doc.xml(pretty: true)
249
-
259
+ File.write raw_formatted_filepath, doc.xml(pretty: true)
260
+
250
261
  doc.root.xpath('records/section/section').each do |node|
251
262
 
252
263
  node.attributes[:created] ||= Time.now.to_s
@@ -267,7 +278,8 @@ EOF
267
278
  end
268
279
  end
269
280
 
270
- File.write newfilepath3, doc.xml(pretty: true)
281
+ render_html doc
282
+ File.write formatted_filepath, doc.xml(pretty: true)
271
283
 
272
284
  end
273
285
 
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.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -122,7 +122,7 @@ dependencies:
122
122
  version: '0.3'
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: 0.3.1
125
+ version: 0.3.2
126
126
  type: :runtime
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
@@ -132,7 +132,7 @@ dependencies:
132
132
  version: '0.3'
133
133
  - - ">="
134
134
  - !ruby/object:Gem::Version
135
- version: 0.3.1
135
+ version: 0.3.2
136
136
  description:
137
137
  email: james@r0bertson.co.uk
138
138
  executables: []
metadata.gz.sig CHANGED
Binary file