mindmapviz 0.2.2 → 0.2.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 +1 -5
- data/lib/mindmapviz.rb +4 -39
- 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: 2658be7c923a8d1f17af5acec40756121e43ec11
|
4
|
+
data.tar.gz: 59d587f8e400221418d9dc81598aa1047f0afd8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ff2a481eca8932612ae0338f83c5d5e0100e6b40f208bcf5755a5bd1dd3b9ef6d53236b1e3761d52a0d38d568c7fb818b7495c0adfd1e444c757b1bf07d671
|
7
|
+
data.tar.gz: b22b9a6b62d7333a62f2abf9c2c9e8f885be4d58de07facb90c081674d2f2b167eca6257255c2a0d3b2503b633bb5ac8bd83e348d7f34538fb704e9a75892f06
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
data/lib/mindmapviz.rb
CHANGED
@@ -8,9 +8,8 @@ require 'pxgraphviz'
|
|
8
8
|
# inspired by https://github.com/bingwei/ruby-graphviz-mindmap
|
9
9
|
|
10
10
|
|
11
|
-
class Mindmapviz
|
11
|
+
class Mindmapviz < PxGraphViz
|
12
12
|
|
13
|
-
attr_reader :raw_doc, :pxg
|
14
13
|
|
15
14
|
def initialize(s, fields: %w(label shape), delimiter: ' # ',
|
16
15
|
style: default_stylesheet())
|
@@ -44,51 +43,17 @@ class Mindmapviz
|
|
44
43
|
|
45
44
|
schema = "items[type, layout]/item[%s]" % fields.join(', ')
|
46
45
|
|
47
|
-
|
46
|
+
raw_doc =<<EOF
|
48
47
|
<?polyrex schema='#{schema}' delimiter='#{delimiter}'?>
|
49
48
|
type: graph
|
50
49
|
layout: neato
|
51
50
|
#{s}
|
52
51
|
EOF
|
53
52
|
|
54
|
-
|
53
|
+
super(raw_doc, style: style)
|
55
54
|
|
56
55
|
end
|
57
56
|
|
58
|
-
def doc()
|
59
|
-
@pxg.doc
|
60
|
-
end
|
61
|
-
|
62
|
-
def export(file='gvml.xml')
|
63
|
-
File.write file, @pxg.to_doc.xml(pretty: true)
|
64
|
-
end
|
65
|
-
|
66
|
-
alias export_as export
|
67
|
-
|
68
|
-
def save(s)
|
69
|
-
File.write filename, @raw_doc
|
70
|
-
end
|
71
|
-
|
72
|
-
def to_dot()
|
73
|
-
@pxg.to_dot
|
74
|
-
end
|
75
|
-
|
76
|
-
# returns a PNG blob
|
77
|
-
#
|
78
|
-
def to_png()
|
79
|
-
@pxg.to_png
|
80
|
-
end
|
81
|
-
|
82
|
-
# returns an SVG blob
|
83
|
-
#
|
84
|
-
def to_svg()
|
85
|
-
@pxg.to_svg
|
86
|
-
end
|
87
|
-
|
88
|
-
def write(filename)
|
89
|
-
@pxg.write filename
|
90
|
-
end
|
91
|
-
|
92
57
|
|
93
58
|
private
|
94
59
|
|
@@ -117,7 +82,7 @@ EOF
|
|
117
82
|
fontcolor: #444444;
|
118
83
|
fontname: Verdana;
|
119
84
|
fontsize: 8;
|
120
|
-
|
85
|
+
dir: none;
|
121
86
|
weight: 1;
|
122
87
|
}
|
123
88
|
STYLE
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mindmapviz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
tTfkCvm++WClBJim2NcI10xzs5g5gHaSXFNVA3y72eSSJ+moAHzciNKJ9iP3GwZK
|
32
32
|
xwzVLef/qNXmag==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-09-
|
34
|
+
date: 2017-09-17 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: pxgraphviz
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
version: '0.4'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.4.
|
45
|
+
version: 0.4.3
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
version: '0.4'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.4.
|
55
|
+
version: 0.4.3
|
56
56
|
description:
|
57
57
|
email: james@jamesrobertson.eu
|
58
58
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|