metanorma-m3d 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.travis.yml +15 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +25 -0
  7. data/README.adoc +170 -0
  8. data/Rakefile +6 -0
  9. data/asciidoctor-m3d.gemspec.old +54 -0
  10. data/bin/console +14 -0
  11. data/bin/rspec +18 -0
  12. data/bin/setup +8 -0
  13. data/lib/asciidoctor-m3d.rb +10 -0
  14. data/lib/asciidoctor/m3d.rb +7 -0
  15. data/lib/asciidoctor/m3d/biblio.rng +836 -0
  16. data/lib/asciidoctor/m3d/converter.rb +188 -0
  17. data/lib/asciidoctor/m3d/html/dots-w@2x.png +0 -0
  18. data/lib/asciidoctor/m3d/html/dots@2x.png +0 -0
  19. data/lib/asciidoctor/m3d/html/header.html +184 -0
  20. data/lib/asciidoctor/m3d/html/html_m3d_intro.html +8 -0
  21. data/lib/asciidoctor/m3d/html/html_m3d_titlepage.html +95 -0
  22. data/lib/asciidoctor/m3d/html/htmlstyle.scss +797 -0
  23. data/lib/asciidoctor/m3d/html/m3d.scss +549 -0
  24. data/lib/asciidoctor/m3d/html/scripts.html +68 -0
  25. data/lib/asciidoctor/m3d/isodoc.rng +1059 -0
  26. data/lib/asciidoctor/m3d/isostandard.rng +1001 -0
  27. data/lib/asciidoctor/m3d/m3d.rng +154 -0
  28. data/lib/asciidoctor/m3d/version.rb +5 -0
  29. data/lib/isodoc/m3d/html/dots-w@2x.png +0 -0
  30. data/lib/isodoc/m3d/html/dots@2x.png +0 -0
  31. data/lib/isodoc/m3d/html/header.html +219 -0
  32. data/lib/isodoc/m3d/html/html_m3d_intro.html +14 -0
  33. data/lib/isodoc/m3d/html/html_m3d_titlepage.html +102 -0
  34. data/lib/isodoc/m3d/html/htmlstyle.scss +1001 -0
  35. data/lib/isodoc/m3d/html/logo.jpg +0 -0
  36. data/lib/isodoc/m3d/html/m3-logo.png +0 -0
  37. data/lib/isodoc/m3d/html/m3d.scss +697 -0
  38. data/lib/isodoc/m3d/html/scripts.html +82 -0
  39. data/lib/isodoc/m3d/html/word_m3d_intro.html +10 -0
  40. data/lib/isodoc/m3d/html/word_m3d_titlepage.html +58 -0
  41. data/lib/isodoc/m3d/html/wordstyle.scss +1003 -0
  42. data/lib/isodoc/m3d/m3dhtmlconvert.rb +154 -0
  43. data/lib/isodoc/m3d/m3dhtmlrender.rb +68 -0
  44. data/lib/isodoc/m3d/m3dwordconvert.rb +105 -0
  45. data/lib/isodoc/m3d/m3wordrender.rb +68 -0
  46. data/lib/isodoc/m3d/metadata.rb +87 -0
  47. data/lib/metanorma/m3d.rb +7 -0
  48. data/lib/metanorma/m3d/processor.rb +41 -0
  49. data/metanorma-m3d.gemspec +55 -0
  50. metadata +419 -0
@@ -0,0 +1,7 @@
1
+ require_relative "./m3d/processor"
2
+
3
+ module Metanorma
4
+ module M3d
5
+
6
+ end
7
+ end
@@ -0,0 +1,41 @@
1
+ require "metanorma/processor"
2
+
3
+ module Metanorma
4
+ module M3d
5
+ class Processor < Metanorma::Processor
6
+
7
+ def initialize
8
+ @short = :m3d
9
+ @input_format = :asciidoc
10
+ @asciidoctor_backend = :m3d
11
+ end
12
+
13
+ def output_formats
14
+ super.merge(
15
+ html: "html",
16
+ doc: "doc"
17
+ )
18
+ end
19
+
20
+ def version
21
+ "Asciidoctor::M3d #{Asciidoctor::M3d::VERSION}"
22
+ end
23
+
24
+ def input_to_isodoc(file)
25
+ Metanorma::Input::Asciidoc.new.process(file, @asciidoctor_backend)
26
+ end
27
+
28
+ def output(isodoc_node, outname, format, options={})
29
+ case format
30
+ when :html
31
+ IsoDoc::M3d::HtmlConvert.new(options).convert(outname, isodoc_node)
32
+ when :doc
33
+ IsoDoc::M3d::WordConvert.new(options).convert(outname, isodoc_node)
34
+ else
35
+ super
36
+ end
37
+ end
38
+
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,55 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "asciidoctor/m3d/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "metanorma-m3d"
7
+ spec.version = Asciidoctor::M3d::VERSION
8
+ spec.authors = ["Ribose Inc."]
9
+ spec.email = ["open.source@ribose.com"]
10
+
11
+ spec.summary = "metanorma-m3d lets you write M3AAWG Documents (M3D) in AsciiDoc."
12
+ spec.description = <<~DESCRIPTION
13
+ metanorma-m3d lets you write M3AAWG Documents (M3D) in AsciiDoc syntax.
14
+
15
+ This gem is in active development.
16
+
17
+ Formerly known as asciidoctor-m3d.
18
+ DESCRIPTION
19
+
20
+ spec.homepage = "https://github.com/riboseinc/metanorma-m3d"
21
+ spec.license = "BSD-2-Clause"
22
+
23
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
+ f.match(%r{^(test|spec|features)/})
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_dependency "asciidoctor", "~> 1.5.7"
31
+ spec.add_dependency "asciimath"
32
+ spec.add_dependency "htmlentities", "~> 4.3.4"
33
+ spec.add_dependency "image_size"
34
+ spec.add_dependency "mime-types"
35
+ spec.add_dependency "nokogiri"
36
+ spec.add_dependency "ruby-jing"
37
+ spec.add_dependency "ruby-xslt"
38
+ spec.add_dependency "thread_safe"
39
+ spec.add_dependency "uuidtools"
40
+
41
+ spec.add_dependency "metanorma-standoc", "~> 1.0.0"
42
+ spec.add_dependency "isodoc", "~> 0.8.8"
43
+
44
+ spec.add_development_dependency "bundler", "~> 1.15"
45
+ spec.add_development_dependency "byebug", "~> 9.1"
46
+ spec.add_development_dependency "equivalent-xml", "~> 0.6"
47
+ spec.add_development_dependency "guard", "~> 2.14"
48
+ spec.add_development_dependency "guard-rspec", "~> 4.7"
49
+ spec.add_development_dependency "rake", "~> 12.0"
50
+ spec.add_development_dependency "rspec", "~> 3.6"
51
+ spec.add_development_dependency "rubocop", "~> 0.50"
52
+ spec.add_development_dependency "simplecov", "~> 0.15"
53
+ spec.add_development_dependency "timecop", "~> 0.9"
54
+ spec.add_development_dependency "metanorma", "~> 0.2.5"
55
+ end
metadata ADDED
@@ -0,0 +1,419 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: metanorma-m3d
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ribose Inc.
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-08-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: asciidoctor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.5.7
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.5.7
27
+ - !ruby/object:Gem::Dependency
28
+ name: asciimath
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: htmlentities
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 4.3.4
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 4.3.4
55
+ - !ruby/object:Gem::Dependency
56
+ name: image_size
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: mime-types
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: nokogiri
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: ruby-jing
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: ruby-xslt
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: thread_safe
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: uuidtools
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: metanorma-standoc
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 1.0.0
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 1.0.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: isodoc
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 0.8.8
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 0.8.8
181
+ - !ruby/object:Gem::Dependency
182
+ name: bundler
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '1.15'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '1.15'
195
+ - !ruby/object:Gem::Dependency
196
+ name: byebug
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '9.1'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '9.1'
209
+ - !ruby/object:Gem::Dependency
210
+ name: equivalent-xml
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '0.6'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '0.6'
223
+ - !ruby/object:Gem::Dependency
224
+ name: guard
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: '2.14'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: '2.14'
237
+ - !ruby/object:Gem::Dependency
238
+ name: guard-rspec
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '4.7'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: '4.7'
251
+ - !ruby/object:Gem::Dependency
252
+ name: rake
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '12.0'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '12.0'
265
+ - !ruby/object:Gem::Dependency
266
+ name: rspec
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "~>"
270
+ - !ruby/object:Gem::Version
271
+ version: '3.6'
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - "~>"
277
+ - !ruby/object:Gem::Version
278
+ version: '3.6'
279
+ - !ruby/object:Gem::Dependency
280
+ name: rubocop
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: '0.50'
286
+ type: :development
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - "~>"
291
+ - !ruby/object:Gem::Version
292
+ version: '0.50'
293
+ - !ruby/object:Gem::Dependency
294
+ name: simplecov
295
+ requirement: !ruby/object:Gem::Requirement
296
+ requirements:
297
+ - - "~>"
298
+ - !ruby/object:Gem::Version
299
+ version: '0.15'
300
+ type: :development
301
+ prerelease: false
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - "~>"
305
+ - !ruby/object:Gem::Version
306
+ version: '0.15'
307
+ - !ruby/object:Gem::Dependency
308
+ name: timecop
309
+ requirement: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - "~>"
312
+ - !ruby/object:Gem::Version
313
+ version: '0.9'
314
+ type: :development
315
+ prerelease: false
316
+ version_requirements: !ruby/object:Gem::Requirement
317
+ requirements:
318
+ - - "~>"
319
+ - !ruby/object:Gem::Version
320
+ version: '0.9'
321
+ - !ruby/object:Gem::Dependency
322
+ name: metanorma
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - "~>"
326
+ - !ruby/object:Gem::Version
327
+ version: 0.2.5
328
+ type: :development
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - "~>"
333
+ - !ruby/object:Gem::Version
334
+ version: 0.2.5
335
+ description: |
336
+ metanorma-m3d lets you write M3AAWG Documents (M3D) in AsciiDoc syntax.
337
+
338
+ This gem is in active development.
339
+
340
+ Formerly known as asciidoctor-m3d.
341
+ email:
342
+ - open.source@ribose.com
343
+ executables: []
344
+ extensions: []
345
+ extra_rdoc_files: []
346
+ files:
347
+ - ".gitignore"
348
+ - ".travis.yml"
349
+ - CODE_OF_CONDUCT.md
350
+ - Gemfile
351
+ - LICENSE
352
+ - README.adoc
353
+ - Rakefile
354
+ - asciidoctor-m3d.gemspec.old
355
+ - bin/console
356
+ - bin/rspec
357
+ - bin/setup
358
+ - lib/asciidoctor-m3d.rb
359
+ - lib/asciidoctor/m3d.rb
360
+ - lib/asciidoctor/m3d/biblio.rng
361
+ - lib/asciidoctor/m3d/converter.rb
362
+ - lib/asciidoctor/m3d/html/dots-w@2x.png
363
+ - lib/asciidoctor/m3d/html/dots@2x.png
364
+ - lib/asciidoctor/m3d/html/header.html
365
+ - lib/asciidoctor/m3d/html/html_m3d_intro.html
366
+ - lib/asciidoctor/m3d/html/html_m3d_titlepage.html
367
+ - lib/asciidoctor/m3d/html/htmlstyle.scss
368
+ - lib/asciidoctor/m3d/html/m3d.scss
369
+ - lib/asciidoctor/m3d/html/scripts.html
370
+ - lib/asciidoctor/m3d/isodoc.rng
371
+ - lib/asciidoctor/m3d/isostandard.rng
372
+ - lib/asciidoctor/m3d/m3d.rng
373
+ - lib/asciidoctor/m3d/version.rb
374
+ - lib/isodoc/m3d/html/dots-w@2x.png
375
+ - lib/isodoc/m3d/html/dots@2x.png
376
+ - lib/isodoc/m3d/html/header.html
377
+ - lib/isodoc/m3d/html/html_m3d_intro.html
378
+ - lib/isodoc/m3d/html/html_m3d_titlepage.html
379
+ - lib/isodoc/m3d/html/htmlstyle.scss
380
+ - lib/isodoc/m3d/html/logo.jpg
381
+ - lib/isodoc/m3d/html/m3-logo.png
382
+ - lib/isodoc/m3d/html/m3d.scss
383
+ - lib/isodoc/m3d/html/scripts.html
384
+ - lib/isodoc/m3d/html/word_m3d_intro.html
385
+ - lib/isodoc/m3d/html/word_m3d_titlepage.html
386
+ - lib/isodoc/m3d/html/wordstyle.scss
387
+ - lib/isodoc/m3d/m3dhtmlconvert.rb
388
+ - lib/isodoc/m3d/m3dhtmlrender.rb
389
+ - lib/isodoc/m3d/m3dwordconvert.rb
390
+ - lib/isodoc/m3d/m3wordrender.rb
391
+ - lib/isodoc/m3d/metadata.rb
392
+ - lib/metanorma/m3d.rb
393
+ - lib/metanorma/m3d/processor.rb
394
+ - metanorma-m3d.gemspec
395
+ homepage: https://github.com/riboseinc/metanorma-m3d
396
+ licenses:
397
+ - BSD-2-Clause
398
+ metadata: {}
399
+ post_install_message:
400
+ rdoc_options: []
401
+ require_paths:
402
+ - lib
403
+ required_ruby_version: !ruby/object:Gem::Requirement
404
+ requirements:
405
+ - - ">="
406
+ - !ruby/object:Gem::Version
407
+ version: '0'
408
+ required_rubygems_version: !ruby/object:Gem::Requirement
409
+ requirements:
410
+ - - ">="
411
+ - !ruby/object:Gem::Version
412
+ version: '0'
413
+ requirements: []
414
+ rubyforge_project:
415
+ rubygems_version: 2.7.6
416
+ signing_key:
417
+ specification_version: 4
418
+ summary: metanorma-m3d lets you write M3AAWG Documents (M3D) in AsciiDoc.
419
+ test_files: []