asciidoctor-m3d 0.2.7 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f796b6eb0ec3b88d6cc2932585c61db7b591fb7ddd352e66e955b8bf25468d2
4
- data.tar.gz: a953610472abcf575045b14b3f8054d30b35697791bdf6d4e2cb05357edf3b52
3
+ metadata.gz: 738054d455f2b744a3e9cb70de431503d92d72f5f6235c37ea741d5c5e7d5134
4
+ data.tar.gz: 19375c04a588bbdd3cfdcb92c686c3017651853006b08c17e00581e4f168ce14
5
5
  SHA512:
6
- metadata.gz: bf31275e3c03d11b5c967563dbed2ecd68296276a88654a2fe3a8a1c4ad136d6d3754c6b17ec01a6ca2dcede0f6baacee6a8005c6a36cca3e7b41adf57f3d898
7
- data.tar.gz: 1d6e010ac13c03ebd7fe0ba7a37ee432370e8f303167d61cc1bf409a33dde726004427d10945ad29e5c48af75f7d07d34fb75787d094f8edf4b6d4f5a68ebf77
6
+ metadata.gz: 3bdc29f96385ebd252c614d9e8b784420657175906c00f3dd8ed00a5db5c86206aceb97b0f0bba9688748e23c91e4edcf9bb8f21892a92f7926756029075c31a
7
+ data.tar.gz: 06c9837fa58facb91add98b3b4e85d8492f2199949a73f2c5de71c83c3099c92159deb3c033c19767f50c3edcf84550d72eccbd54cb95922863d43ea5575ff59
@@ -1,11 +1,12 @@
1
1
  GIT
2
2
  remote: https://github.com/riboseinc/asciidoctor-iso
3
- revision: 8e9f119ed5c38e7d75d975b1a945ebb069f94a27
3
+ revision: 1fca67f1a4e7a67461ea3999918abc10bca3ca2c
4
4
  specs:
5
- asciidoctor-iso (0.8.1)
5
+ asciidoctor-iso (0.9.0)
6
6
  asciidoctor (~> 1.5.7)
7
- isobib (~> 0.1.4)
8
- isodoc (>= 0.7.0)
7
+ iso-bib-item (~> 0.1.6)
8
+ isobib (~> 0.1.6)
9
+ isodoc (>= 0.8)
9
10
  ruby-jing
10
11
 
11
12
  GIT
@@ -24,9 +25,9 @@ GIT
24
25
 
25
26
  GIT
26
27
  remote: https://github.com/riboseinc/isodoc
27
- revision: cd4f1ecfcf31b0462f783159c8978007c929ceb8
28
+ revision: 601c1870fea386cb54fd8b2f112f680f71bd58a3
28
29
  specs:
29
- isodoc (0.7.0)
30
+ isodoc (0.8)
30
31
  asciimath
31
32
  html2doc (>= 0.7.1)
32
33
  htmlentities (~> 4.3.4)
@@ -43,13 +44,13 @@ GIT
43
44
  PATH
44
45
  remote: .
45
46
  specs:
46
- asciidoctor-m3d (0.2.6)
47
+ asciidoctor-m3d (0.2.7)
47
48
  asciidoctor (~> 1.5.7)
48
- asciidoctor-iso (>= 0.8.0)
49
+ asciidoctor-iso (>= 0.9.0)
49
50
  asciimath
50
51
  htmlentities (~> 4.3.4)
51
52
  image_size
52
- isodoc (>= 0.7.0)
53
+ isodoc (>= 0.8.0)
53
54
  mime-types
54
55
  nokogiri
55
56
  ruby-jing
@@ -60,7 +61,7 @@ PATH
60
61
  GEM
61
62
  remote: https://rubygems.org/
62
63
  specs:
63
- algoliasearch (1.22.0)
64
+ algoliasearch (1.23.2)
64
65
  httpclient (~> 2.8, >= 2.8.3)
65
66
  json (>= 1.5.1)
66
67
  asciidoctor (1.5.7.1)
@@ -70,6 +71,7 @@ GEM
70
71
  coderay (1.1.2)
71
72
  diff-lcs (1.3)
72
73
  docile (1.3.1)
74
+ duplicate (1.1.1)
73
75
  equivalent-xml (0.6.0)
74
76
  nokogiri (>= 1.4.3)
75
77
  ffi (1.9.25)
@@ -91,10 +93,11 @@ GEM
91
93
  htmlentities (4.3.4)
92
94
  httpclient (2.8.3)
93
95
  image_size (2.0.0)
94
- iso-bib-item (0.1.5)
96
+ iso-bib-item (0.1.6)
97
+ duplicate
95
98
  isoics (~> 0.1.6)
96
99
  nokogiri
97
- isobib (0.1.5)
100
+ isobib (0.1.6)
98
101
  algoliasearch
99
102
  iso-bib-item (~> 0.1.2)
100
103
  isoics (0.1.6)
@@ -112,7 +115,7 @@ GEM
112
115
  mime-types-data (3.2016.0521)
113
116
  mini_portile2 (2.3.0)
114
117
  nenv (0.3.0)
115
- nokogiri (1.8.2)
118
+ nokogiri (1.8.3)
116
119
  mini_portile2 (~> 2.3.0)
117
120
  notiffany (0.1.1)
118
121
  nenv (~> 0.1)
@@ -36,8 +36,8 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency "thread_safe"
37
37
  spec.add_dependency "uuidtools"
38
38
 
39
- spec.add_dependency "asciidoctor-iso", ">= 0.8.0"
40
- spec.add_dependency "isodoc", ">= 0.7.0"
39
+ spec.add_dependency "asciidoctor-iso", ">= 0.9.0"
40
+ spec.add_dependency "isodoc", ">= 0.8.0"
41
41
 
42
42
  spec.add_development_dependency "bundler", "~> 1.15"
43
43
  spec.add_development_dependency "byebug", "~> 9.1"
@@ -3,3 +3,8 @@ require_relative "asciidoctor/m3d/converter"
3
3
  require_relative "isodoc/m3d/m3dhtmlconvert"
4
4
  require_relative "isodoc/m3d/m3dwordconvert"
5
5
  require_relative "asciidoctor/m3d/version"
6
+
7
+ if defined? Metanorma
8
+ require_relative "metanorma/m3d"
9
+ Metanorma::Registry.instance.register(Metanorma::M3d::Processor)
10
+ end
@@ -139,7 +139,7 @@ module Asciidoctor
139
139
  end
140
140
 
141
141
  def html_converter(node)
142
- IsoDoc::M3d::Convert.new(
142
+ IsoDoc::M3d::HtmlConvert.new(
143
143
  script: node.attr("script"),
144
144
  bodyfont: node.attr("body-font"),
145
145
  headerfont: node.attr("header-font"),
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module M3d
3
- VERSION = "0.2.7"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -138,7 +138,7 @@ background:#E0E0E0'><o:p>&nbsp;</o:p></span></p>
138
138
 
139
139
  <div style='mso-element:header' id=fh1>
140
140
 
141
- <p class=MsoHeader><img width="323" height="39" src="logo.jpg"></img>
141
+ <p class=MsoHeader><img width="323" height="39" src="logo.png"></img>
142
142
  <!--[if gte vml 1]><v:line id="_x0000_s2049" alt=""
143
143
  style='position:absolute;flip:y;z-index:251659264;mso-wrap-style:none;
144
144
  mso-wrap-edited:f;mso-width-percent:0;mso-height-percent:0;
@@ -6,7 +6,7 @@ module IsoDoc
6
6
  module M3d
7
7
  # A {Converter} implementation that generates CSAND output, and a document
8
8
  # schema encapsulation of the document for validation
9
- class Convert < IsoDoc::Convert
9
+ class HtmlConvert < IsoDoc::HtmlConvert
10
10
  def html_doc_path(file)
11
11
  File.join(File.dirname(__FILE__), File.join("html", file))
12
12
  end
@@ -110,7 +110,7 @@ module IsoDoc
110
110
  def error_parse(node, out)
111
111
  # catch elements not defined in ISO
112
112
  case node.name
113
- when "pre"
113
+ when "pre"
114
114
  pre_parse(node, out)
115
115
  when "keyword"
116
116
  out.span node.text, **{ class: "keyword" }
@@ -2,7 +2,7 @@ module IsoDoc
2
2
  module M3d
3
3
  # A {Converter} implementation that generates CSAND output, and a document
4
4
  # schema encapsulation of the document for validation
5
- class Convert < IsoDoc::Convert
5
+ class HtmlConvert < IsoDoc::HtmlConvert
6
6
  def annex_name(annex, name, div)
7
7
  div.h1 **{ class: "Annex" } do |t|
8
8
  t << "#{get_anchors[annex['id']][:label]} "
@@ -69,6 +69,7 @@ module IsoDoc
69
69
  params = meta.map { |k, v| [k.to_s, v] }.to_h
70
70
  File.open("header.html", "w") { |f| f.write(template.render(params)) }
71
71
  @files_to_delete << "header.html"
72
+ "header.html"
72
73
  end
73
74
 
74
75
  def header_strip(h)
@@ -0,0 +1,7 @@
1
+ require_relative "./m3d/processor"
2
+
3
+ module Metanorma
4
+ module M3d
5
+
6
+ end
7
+ end
@@ -0,0 +1,35 @@
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
+ {
15
+ html: "html",
16
+ doc: "doc"
17
+ }
18
+ end
19
+
20
+ def input_to_isodoc(file)
21
+ Metanorma::Input::Asciidoc.new.process(file, @asciidoctor_backend)
22
+ end
23
+
24
+ def output(isodoc_node, outname, format, options={})
25
+ case format
26
+ when :html
27
+ IsoDoc::M3d::HtmlConvert.new(options).convert(outname, isodoc_node)
28
+ when :doc
29
+ IsoDoc::M3d::WordConvert.new(options).convert(outname, isodoc_node)
30
+ end
31
+ end
32
+
33
+ end
34
+ end
35
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-m3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-18 00:00:00.000000000 Z
11
+ date: 2018-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -156,28 +156,28 @@ dependencies:
156
156
  requirements:
157
157
  - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: 0.8.0
159
+ version: 0.9.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
- version: 0.8.0
166
+ version: 0.9.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: isodoc
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: 0.7.0
173
+ version: 0.8.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: 0.7.0
180
+ version: 0.8.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -362,6 +362,7 @@ files:
362
362
  - lib/isodoc/m3d/html/html_m3d_intro.html
363
363
  - lib/isodoc/m3d/html/html_m3d_titlepage.html
364
364
  - lib/isodoc/m3d/html/htmlstyle.scss
365
+ - lib/isodoc/m3d/html/logo.jpg
365
366
  - lib/isodoc/m3d/html/m3d.scss
366
367
  - lib/isodoc/m3d/html/scripts.html
367
368
  - lib/isodoc/m3d/html/word_m3d_intro.html
@@ -372,6 +373,8 @@ files:
372
373
  - lib/isodoc/m3d/m3dwordconvert.rb
373
374
  - lib/isodoc/m3d/m3wordrender.rb
374
375
  - lib/isodoc/m3d/metadata.rb
376
+ - lib/metanorma/m3d.rb
377
+ - lib/metanorma/m3d/processor.rb
375
378
  homepage: https://github.com/riboseinc/asciidoctor-m3d
376
379
  licenses:
377
380
  - MIT
@@ -392,7 +395,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
395
  version: '0'
393
396
  requirements: []
394
397
  rubyforge_project:
395
- rubygems_version: 2.7.6
398
+ rubygems_version: 2.7.7
396
399
  signing_key:
397
400
  specification_version: 4
398
401
  summary: asciidoctor-m3d lets you write M3AAWG Documents (M3D) in AsciiDoc.