mindmap_mfm 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 41f9a4080ea18c59b5d162ed13466a1a03250bac
4
+ data.tar.gz: 827af4e95d2477a883356f9c333badf0867cc734
5
+ SHA512:
6
+ metadata.gz: cb6c33079449532da9b97f592ffbed7e26aadef75dd291f7496fe4e7cb6b9ce88b204b92314f5308c8079972a864713a56e461faadb325cc649261e072cd756b
7
+ data.tar.gz: 7b93e766c3e808efbb450ae9618677dd6ba5aa5c5c4cb1b7b6049d1a89230439acc236976857b50295fe24a86b7a926b7d880e241b8c3d30b46fbb991aa9bbc8
checksums.yaml.gz.sig ADDED
@@ -0,0 +1 @@
1
+ m�ݠ\�H��&�Dp����G}��㹇'_�D�˳�7�v��j!2!K�?� ���D�_���N/c ��J a"vh�R�I�^[�;��S3S�l��ġ Sl��p%Ej�y�;�zyH)�w'�N�n�X��V� @�$8j�
data.tar.gz.sig ADDED
Binary file
@@ -0,0 +1,64 @@
1
+ !#/usr/bin/env ruby
2
+
3
+ # file: mindmap_mfm.rb
4
+
5
+
6
+ require 'martile'
7
+ require 'kramdown'
8
+ require 'mindmapdoc'
9
+
10
+
11
+ class MindmapMFM
12
+
13
+ def initialize(s)
14
+
15
+ @rawdoc = build_rawdoc(s)
16
+
17
+ end
18
+
19
+ def to_html()
20
+ Kramdown::Document.new(@rawdoc).to_html
21
+ end
22
+
23
+ private
24
+
25
+ def build_rawdoc(s)
26
+
27
+ head =<<EOF
28
+ <head>
29
+ <style>
30
+ h2 {background-color: #ee2;}
31
+ svg {fill: #3ac;}
32
+ a ellipse2 {fill: #3ac}
33
+ a ellipse2:hover {fill: #3ac}
34
+ g.link {fill: #314}
35
+ g.node {fill: #311}
36
+ a {fill: #114; }
37
+ svg g a:hover {background-color: #3ac; }
38
+ #doc {float: right; width: 50%; overflow-y: auto; height: 90%}
39
+ </style>
40
+ </head>
41
+ EOF
42
+
43
+
44
+ a = s.split(/(?=__DATA__)/,2)
45
+ a2 = a.first.split(/(?=!s)/,2)
46
+ svg = a2[1].lines.first
47
+ div = a2[1].lines[1..-1]
48
+
49
+ html = [
50
+ "<html>\n",
51
+ head,
52
+ "\n <body markdown='1'>\n\n",
53
+ a2[0],
54
+ svg,
55
+ "<div markdown='1' id='doc'>\n\n", div, "</div>\n</body>\n</html>\n\n",
56
+ a.last
57
+ ].join
58
+
59
+ Martile.new(html).to_s
60
+
61
+ end
62
+
63
+ end
64
+
metadata ADDED
@@ -0,0 +1,127 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mindmap_mfm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDXjCCAkagAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDDCFnZW1t
14
+ YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTgwMjA4MTIxNTM4WhcN
15
+ MTkwMjA4MTIxNTM4WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
+ cnRzb24vREM9ZXUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCiVsg2
17
+ gYJhochqWq7bBF9YzNbd5sQ9XqsAzIY+KpvuBVox03Rz6y6AyvLwi765lUcQmB8G
18
+ ZWSMxQhM9M0YSWAhSsEpBHqqysPO6eAl49EnoV+TSSSTqtu345S8FI9O+dgiLzuT
19
+ m0JxxHq5CELHocVdKDPCv0Jfhzizq7o1bL/YFJK/H1kiP+GwGD+CTEh3ocf/KQ9/
20
+ Ptc2vWaM7/LypnfLvH2Dg7gpR57IyqwIGWbDCXU5v+3xB35Ror91NOx6kVBIqdUC
21
+ I/hCHemp1HEC7kYnpnX0BIsyKlracw3lw2KQHAkVMxbKdo0+O6fwEac6vxCfMy0a
22
+ h+MEAHMAtHTw+zbZAgMBAAGjgYowgYcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
23
+ HQYDVR0OBBYEFNe7Rd8C46qRJo4mwQ8syaP2MM0+MCYGA1UdEQQfMB2BG2dlbW1h
24
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTAmBgNVHRIEHzAdgRtnZW1tYXN0ZXJAamFt
25
+ ZXNyb2JlcnRzb24uZXUwDQYJKoZIhvcNAQEFBQADggEBAHljc3csF8EbslputId8
26
+ 00zmLo0NUFDYvsPpXmmCrXs0ZDyZwmfcu6QLpwT6aM/MjRo6FxgAyXDeZH/cYs1q
27
+ ox7nLZak85WJF8UOWVplabi4Hf+X0IfTEsqDTY84CUidFWLu+9mneLD/NmXjSUcJ
28
+ 9K8QmnsZnT13KrU8k+P0zCUh9Kbva7Ncc8PIhsE3E4ztHblG1+VLKnx5fYI+X+YR
29
+ ncbJEXcU67D/JiqigA84gUJH3IS6EgbgRoQ+bZsqIWwPCJODxnMxI0VBZN4Z1TQI
30
+ psX3wHSCzaVBci2BgFjWgkcfzQhHUZuwhmzOTmIpIiSDkL5n+E0dmvu2ykk4C7WL
31
+ uQk=
32
+ -----END CERTIFICATE-----
33
+ date: 2018-02-08 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: martile
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '0.8'
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 0.8.1
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '0.8'
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.8.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: mindmapdoc
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.1'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.1.2
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '0.1'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.1.2
75
+ - !ruby/object:Gem::Dependency
76
+ name: kramdown
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '1.16'
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 1.16.2
85
+ type: :runtime
86
+ prerelease: false
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '1.16'
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 1.16.2
95
+ description:
96
+ email: james@jamesrobertson.eu
97
+ executables: []
98
+ extensions: []
99
+ extra_rdoc_files: []
100
+ files:
101
+ - lib/mindmap_mfm.rb
102
+ homepage: https://github.com/jrobertson/mindmap_mfm
103
+ licenses:
104
+ - MIT
105
+ metadata: {}
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubyforge_project:
122
+ rubygems_version: 2.6.13
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: Generates HTML with an embedded SVG hyperlinked mindmap along with associated
126
+ anchored headings.
127
+ test_files: []
metadata.gz.sig ADDED
Binary file