myoutline 0.4.4 → 0.4.5
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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/myoutline.rb +18 -10
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d1b6e81f06399bb9e831e88a29c6467a5ded9dfd61bbfce42f57d6a1a7fb620c
|
4
|
+
data.tar.gz: 3a769e535de5132b480e89b1eaa190e7803173c53f1d59b04878f9fb5a152230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d2986b96ef7c4f28e23a7289a5796c727a8351eb42ad1a4b373e109d2ef13244734de0de82316230a0bc57a04ca38fc09afbd48afbf6e1799323ec9ea032492
|
7
|
+
data.tar.gz: 5436100739b574c27d1da15e6e0a960591d46444aa2d2bb9f53f7b6e57d8c3e7f901f828771eee1e7003b584de53725d00c98607b2fc6edc65d4c06e9c792bc5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/myoutline.rb
CHANGED
@@ -15,6 +15,7 @@ class MyOutline
|
|
15
15
|
attr_accessor :md
|
16
16
|
|
17
17
|
class Outline
|
18
|
+
using ColouredText
|
18
19
|
|
19
20
|
attr_reader :ftx, :links, :pxi
|
20
21
|
|
@@ -29,10 +30,10 @@ class MyOutline
|
|
29
30
|
|
30
31
|
def autosave(s=nil)
|
31
32
|
|
32
|
-
puts 'inside autosave ; @autoupdate: ' + @autoupdate.inspect if @debug
|
33
|
+
puts ('inside autosave ; @autoupdate: ' + @autoupdate.inspect).debug if @debug
|
33
34
|
|
34
35
|
if @autoupdate then
|
35
|
-
puts 'before save' if @debug
|
36
|
+
puts 'before save'.info if @debug
|
36
37
|
save() if s.nil? or self.to_s != s
|
37
38
|
end
|
38
39
|
|
@@ -183,7 +184,7 @@ class MyOutline
|
|
183
184
|
|
184
185
|
def to_html()
|
185
186
|
|
186
|
-
px = self.to_px
|
187
|
+
px = self.outline.to_px
|
187
188
|
|
188
189
|
px.each_recursive do |x, parent|
|
189
190
|
|
@@ -197,19 +198,26 @@ class MyOutline
|
|
197
198
|
|
198
199
|
end
|
199
200
|
|
200
|
-
doc
|
201
|
+
doc = Nokogiri::XML(px.to_xml)
|
201
202
|
xsl = Nokogiri::XSLT(xslt())
|
202
203
|
|
203
|
-
|
204
|
+
html_doc = Rexle.new(xsl.transform(doc).to_s)
|
204
205
|
|
205
|
-
|
206
|
+
html_doc.root.css('.atopic').each do |e|
|
207
|
+
|
206
208
|
puts 'e: ' + e.parent.parent.xml.inspect if @debug
|
207
|
-
|
208
|
-
|
209
|
-
|
209
|
+
|
210
|
+
href = e.attributes[:href]
|
211
|
+
if href.empty? or href[0] == '!' then
|
212
|
+
|
213
|
+
e.attributes[:href] = @topic_url.sub(/\$topic/, e.text)\
|
214
|
+
.sub(/\$id/, e.attributes[:id]).sub(/\$trail/, e.attributes[:trail])\
|
215
|
+
.to_s.gsub(/ +/,'-')
|
216
|
+
|
217
|
+
end
|
210
218
|
end
|
211
219
|
|
212
|
-
|
220
|
+
html_doc.xml(pretty: true, declaration: false)
|
213
221
|
|
214
222
|
end
|
215
223
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myoutline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
DFhc5TDtqEkJYiaiznQFl34HUKeCAdeAHkmD8jP3fUC8O7zcLXq69EAXGMXw4efB
|
31
31
|
3Co=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2019-01-15 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: pxindex
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.6
|
162
|
+
rubygems_version: 2.7.6
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: Helps build an outline from plain text.
|
metadata.gz.sig
CHANGED
Binary file
|