martile 0.7.2 → 0.7.3
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/martile.rb +29 -9
- metadata +29 -9
- 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: 5c9050ed070ce8ba9b23417e4cdc7f458f631010
|
4
|
+
data.tar.gz: dc5273e48401c4586c298142bce8c5365d4cf8a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c4ea26e9b558a41c74f028c05d10b157099571fcbb16f1e92b969790b1f2b061532dbfa78d6ee6db77c964b7642658ecbd6656ce786c5a1c4503ce2d0358db7
|
7
|
+
data.tar.gz: e5fa8bd3af9e1be7a1c47484d8e32a014effb8580f823f0bd9db217a514bdca3fd278bdbc1ae658a7f8868823058e1f866f4344c5a23962d57ca369ef8a10827
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/martile.rb
CHANGED
@@ -4,11 +4,13 @@
|
|
4
4
|
|
5
5
|
#require 'rexle-builder'
|
6
6
|
#require 'rexle'
|
7
|
+
require 'kvx'
|
7
8
|
require 'dynarex'
|
8
9
|
require 'rdiscount'
|
9
|
-
require '
|
10
|
+
require 'mindmapviz'
|
10
11
|
|
11
12
|
|
13
|
+
# feature: 9-Sep-2017 A Mindmapviz raw document can now be embedded
|
12
14
|
# feature: 8-Sep-2017 An SVG doc can now be embedded from !s[]()
|
13
15
|
# feature: 6-Sep-2017 The preparation of a Dynarex table in Markdown is now
|
14
16
|
# done from the Dynarex object
|
@@ -337,6 +339,7 @@ class Martile
|
|
337
339
|
end
|
338
340
|
|
339
341
|
end
|
342
|
+
|
340
343
|
|
341
344
|
def mtlite_utils(s)
|
342
345
|
|
@@ -481,10 +484,17 @@ class Martile
|
|
481
484
|
next if s2.empty?
|
482
485
|
|
483
486
|
id = s2.lines.first[/id=["']([^"']+)/,1]
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
487
|
+
|
488
|
+
@data_source[id] = case s2
|
489
|
+
when /^<\?dynarex /
|
490
|
+
|
491
|
+
dx = Dynarex.new
|
492
|
+
dx.import s2
|
493
|
+
dx
|
494
|
+
when /^<\?mindmapviz /
|
495
|
+
|
496
|
+
Mindmapviz.new s2
|
497
|
+
end
|
488
498
|
end
|
489
499
|
|
490
500
|
a[0..-2].join
|
@@ -598,12 +608,22 @@ class Martile
|
|
598
608
|
|
599
609
|
def svgtag(s)
|
600
610
|
|
601
|
-
s.gsub(/\B!s\[\]\((https?:\/\/[^\)]+)\)/) do
|
611
|
+
s.gsub(/\B!s\[\]\((#\w+|https?:\/\/[^\)]+)\)/) do
|
612
|
+
|
613
|
+
source = ($1)
|
614
|
+
|
615
|
+
svg = if source =~ /^http/ then
|
616
|
+
|
617
|
+
RXFHelper.read($1).first
|
618
|
+
|
619
|
+
else
|
620
|
+
|
621
|
+
@data_source[source[/\w+/]].to_svg
|
622
|
+
|
623
|
+
end
|
602
624
|
|
603
|
-
svg = RXFHelper.read($1).first
|
604
625
|
svg.slice!(/.*(?=<svg)/m)
|
605
626
|
svg
|
606
|
-
|
607
627
|
end
|
608
628
|
|
609
629
|
end
|
@@ -641,4 +661,4 @@ class Martile
|
|
641
661
|
s.gsub(/\B(\* +)([^\n]+)\s+(https?:\/\/.*)/,'\1[\2](\3)')
|
642
662
|
|
643
663
|
end
|
644
|
-
end
|
664
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: martile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,8 +31,28 @@ cert_chain:
|
|
31
31
|
ta+wi0WcePPmMfSbCGQcYixXdM6qZvflWMz0AK44eQcm6OymMXgMQG6GvHPAl6s2
|
32
32
|
ASPGReskINIIrA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-09-
|
34
|
+
date: 2017-09-09 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: kvx
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0.6'
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.6.4
|
46
|
+
type: :runtime
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0.6'
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.6.4
|
36
56
|
- !ruby/object:Gem::Dependency
|
37
57
|
name: rdiscount
|
38
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,7 +82,7 @@ dependencies:
|
|
62
82
|
version: '1.7'
|
63
83
|
- - ">="
|
64
84
|
- !ruby/object:Gem::Version
|
65
|
-
version: 1.7.
|
85
|
+
version: 1.7.25
|
66
86
|
type: :runtime
|
67
87
|
prerelease: false
|
68
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -72,27 +92,27 @@ dependencies:
|
|
72
92
|
version: '1.7'
|
73
93
|
- - ">="
|
74
94
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.7.
|
95
|
+
version: 1.7.25
|
76
96
|
- !ruby/object:Gem::Dependency
|
77
|
-
name:
|
97
|
+
name: mindmapviz
|
78
98
|
requirement: !ruby/object:Gem::Requirement
|
79
99
|
requirements:
|
80
100
|
- - "~>"
|
81
101
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
102
|
+
version: '0.2'
|
83
103
|
- - ">="
|
84
104
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.
|
105
|
+
version: 0.2.1
|
86
106
|
type: :runtime
|
87
107
|
prerelease: false
|
88
108
|
version_requirements: !ruby/object:Gem::Requirement
|
89
109
|
requirements:
|
90
110
|
- - "~>"
|
91
111
|
- !ruby/object:Gem::Version
|
92
|
-
version: '0.
|
112
|
+
version: '0.2'
|
93
113
|
- - ">="
|
94
114
|
- !ruby/object:Gem::Version
|
95
|
-
version: 0.
|
115
|
+
version: 0.2.1
|
96
116
|
description:
|
97
117
|
email: james@jamesrobertson.eu
|
98
118
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|