asciidoctor-csand 0.2.8 → 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: 5452725006b85a3c51448bb2a31d778c3070727712d9fcfa5d768742744c8c73
4
- data.tar.gz: ffec7ab9cc922a2c7b7a50c6ff5049b008ebff77bc11e75f9916e44451c57640
3
+ metadata.gz: 64a6d22ce8dc776cd2f64ef77b55df5a903abc98a56fc6cd2245f7b5fe97c04c
4
+ data.tar.gz: db40f9ed86dd73a03a32d73e4348cd006b86257539db653c9fa52237aaa27d7c
5
5
  SHA512:
6
- metadata.gz: 5e984fd1a66073d97657a8bd37687904cbb837afdf3a5087634424f04f8a66df867dafecdf46b29a2c4c790aa71879897e752dc044dd094f55fec7599d00bab0
7
- data.tar.gz: e1a8d13cd3a525634e382ad94af3b131243989571418f116056c300aba88ddc8932729d7f206adaea1f3f8c5141edbb83c66a4686ae83b526a58ec6aaa429990
6
+ metadata.gz: '0158a7ca61c916bd4ddf0ef1c0360ba8bf5f142ba74e245f245608713e8f9f0d3c86e3312b763c419cc1c1a4ee178b022f1632883acabdfab0918ae1001bc475'
7
+ data.tar.gz: 341cab8af82ecd42c3c321da3dc5fffd008ba08169df04c0afe5bde038842e43c17f458af37b89197f090b7404d7dfca41a439dd8e53e526c13291f196ed352d
@@ -1,18 +1,19 @@
1
1
  GIT
2
2
  remote: https://github.com/riboseinc/asciidoctor-iso
3
- revision: 8cc05dd17f42f68102e39f84f122775a801f403f
3
+ revision: 1fca67f1a4e7a67461ea3999918abc10bca3ca2c
4
4
  specs:
5
- asciidoctor-iso (0.8.2)
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
12
13
  remote: https://github.com/riboseinc/isodoc
13
- revision: d2e9d051f6c517b9ddec814a259b0f44c7e5c971
14
+ revision: 601c1870fea386cb54fd8b2f112f680f71bd58a3
14
15
  specs:
15
- isodoc (0.7.1)
16
+ isodoc (0.8)
16
17
  asciimath
17
18
  html2doc (>= 0.7.1)
18
19
  htmlentities (~> 4.3.4)
@@ -29,13 +30,13 @@ GIT
29
30
  PATH
30
31
  remote: .
31
32
  specs:
32
- asciidoctor-csand (0.2.7)
33
+ asciidoctor-csand (0.3.0)
33
34
  asciidoctor (~> 1.5.7)
34
- asciidoctor-iso (>= 0.8.0)
35
+ asciidoctor-iso (>= 0.9.0)
35
36
  asciimath
36
37
  htmlentities (~> 4.3.4)
37
38
  image_size
38
- isodoc (>= 0.7.0)
39
+ isodoc (>= 0.8.0)
39
40
  mime-types
40
41
  nokogiri
41
42
  ruby-jing
@@ -46,7 +47,7 @@ PATH
46
47
  GEM
47
48
  remote: https://rubygems.org/
48
49
  specs:
49
- algoliasearch (1.22.0)
50
+ algoliasearch (1.23.2)
50
51
  httpclient (~> 2.8, >= 2.8.3)
51
52
  json (>= 1.5.1)
52
53
  asciidoctor (1.5.7.1)
@@ -87,7 +88,7 @@ GEM
87
88
  htmlentities (4.3.4)
88
89
  httpclient (2.8.3)
89
90
  image_size (2.0.0)
90
- iso-bib-item (0.1.5)
91
+ iso-bib-item (0.1.6)
91
92
  duplicate
92
93
  isoics (~> 0.1.6)
93
94
  nokogiri
@@ -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"
@@ -2,3 +2,8 @@ require "asciidoctor" unless defined? Asciidoctor::Converter
2
2
  require_relative "asciidoctor/csand/converter"
3
3
  require_relative "isodoc/csand/csandconvert"
4
4
  require_relative "asciidoctor/csand/version"
5
+
6
+ if defined? Metanorma
7
+ require_relative "metanorma/csand"
8
+ Metanorma::Registry.instance.register(Metanorma::Csand::Processor)
9
+ end
@@ -137,7 +137,7 @@ module Asciidoctor
137
137
  end
138
138
 
139
139
  def html_converter(node)
140
- IsoDoc::Csand::Convert.new(
140
+ IsoDoc::Csand::HtmlConvert.new(
141
141
  script: node.attr("script"),
142
142
  bodyfont: node.attr("body-font"),
143
143
  headerfont: node.attr("header-font"),
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Csand
3
- VERSION = "0.2.8"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -5,7 +5,7 @@ module IsoDoc
5
5
  module Csand
6
6
  # A {Converter} implementation that generates CSAND output, and a document
7
7
  # schema encapsulation of the document for validation
8
- class Convert < IsoDoc::Convert
8
+ class HtmlConvert < IsoDoc::HtmlConvert
9
9
  def html_doc_path(file)
10
10
  File.join(File.dirname(__FILE__), File.join("html", file))
11
11
  end
@@ -67,7 +67,7 @@ module IsoDoc
67
67
  def error_parse(node, out)
68
68
  # catch elements not defined in ISO
69
69
  case node.name
70
- when "pre"
70
+ when "pre"
71
71
  pre_parse(node, out)
72
72
  when "keyword"
73
73
  out.span node.text, **{ class: "keyword" }
@@ -0,0 +1,7 @@
1
+ require_relative "./csand/processor"
2
+
3
+ module Metanorma
4
+ module Csand
5
+
6
+ end
7
+ end
@@ -0,0 +1,32 @@
1
+ require "metanorma/processor"
2
+
3
+ module Metanorma
4
+ module Csand
5
+ class Processor < Metanorma::Processor
6
+
7
+ def initialize
8
+ @short = :csand
9
+ @input_format = :asciidoc
10
+ @asciidoctor_backend = :csand
11
+ end
12
+
13
+ def output_formats
14
+ {
15
+ html: "html"
16
+ }
17
+ end
18
+
19
+ def input_to_isodoc(file)
20
+ Metanorma::Input::Asciidoc.new.process(file, @asciidoctor_backend)
21
+ end
22
+
23
+ def output(isodoc_node, outname, format, options={})
24
+ case format
25
+ when :html
26
+ IsoDoc::Csand::HtmlConvert.new(options).convert(outname, isodoc_node)
27
+ end
28
+ end
29
+
30
+ end
31
+ end
32
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-csand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
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
@@ -358,6 +358,8 @@ files:
358
358
  - lib/isodoc/csand/html/htmlstyle.scss
359
359
  - lib/isodoc/csand/html/scripts.html
360
360
  - lib/isodoc/csand/metadata.rb
361
+ - lib/metanorma/csand.rb
362
+ - lib/metanorma/csand/processor.rb
361
363
  homepage: https://github.com/riboseinc/asciidoctor-csand
362
364
  licenses:
363
365
  - MIT
@@ -378,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
378
380
  version: '0'
379
381
  requirements: []
380
382
  rubyforge_project:
381
- rubygems_version: 2.7.6
383
+ rubygems_version: 2.7.7
382
384
  signing_key:
383
385
  specification_version: 4
384
386
  summary: asciidoctor-csand lets you write CSA Normal Documents (CSAND) in AsciiDoc.