asciidoctor-rsd 0.2.6 → 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: 125e4e4e5bd3ba63730512aed41030e1e94494d057555508f8881f0f93449574
4
- data.tar.gz: fb16064348b81d89aea374e9081ca3b2d1167ccabc7fdd1d8e24f40541136553
3
+ metadata.gz: bf978ade6b83c1a6c073af687b1eff91a233030d071f292a60ea4c6a3366b4db
4
+ data.tar.gz: 62078ebc29dab12add1d0bd10a6055c43c9fdb608a0cbf996b6c4ab1c2e67ace
5
5
  SHA512:
6
- metadata.gz: dc1fa1e54d189d87c6420c018cf932f667bcd519278b03c29a91118d3e0c915d558000881f7c32eabcdab9bfecf841770e2f2a77997afba67b07cbfb6eb68681
7
- data.tar.gz: 0a7e8c0277b0309970f8121931606837aca23d934ecf5745609006f054c1cd9f1062c3276003bd5741b064e0ce290f21402ba97c643650358cdcaab4f1142b78
6
+ metadata.gz: bbd4ce4e7abde3a0d8250795147aa06dcdba862b5bc3a9133a6ae31445ba793a68356aea3d5c7207b73edec85f63b05623cd52492cfc999f5ed1872d353e8e58
7
+ data.tar.gz: f859f3b6221fe7873e98321f15fc540631f55ee747a01faa60aa8a88aba1ce64270e43908025920a9cac5433a198d3b3a934427eb289a2fa6568fad3557fb843
@@ -0,0 +1,7 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.3
5
+ before_install:
6
+ - gem install bundler -v 1.16.1
7
+ - unset _JAVA_OPTIONS
@@ -1,11 +1,12 @@
1
1
  GIT
2
2
  remote: https://github.com/riboseinc/asciidoctor-iso
3
- revision: 975b5652397e67bbb5e48746882760c0745f163e
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: 8cdd3243c0479eb35e6a28d044759477f6fb2f44
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,7 +44,7 @@ GIT
43
44
  PATH
44
45
  remote: .
45
46
  specs:
46
- asciidoctor-rsd (0.2.6)
47
+ asciidoctor-rsd (0.3.0)
47
48
  asciidoctor (~> 1.5.7)
48
49
  asciidoctor-iso (>= 0.8.0)
49
50
  asciimath
@@ -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)
@@ -3,3 +3,8 @@ require_relative "asciidoctor/rsd/converter"
3
3
  require_relative "isodoc/rsd/rsdhtmlconvert"
4
4
  require_relative "isodoc/rsd/rsdwordconvert"
5
5
  require_relative "asciidoctor/rsd/version"
6
+
7
+ if defined? Metanorma
8
+ require_relative "metanorma/rsd"
9
+ Metanorma::Registry.instance.register(Metanorma::Rsd::Processor)
10
+ end
@@ -139,7 +139,7 @@ module Asciidoctor
139
139
  end
140
140
 
141
141
  def html_converter(node)
142
- IsoDoc::Rsd::Convert.new(
142
+ IsoDoc::Rsd::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 Rsd
3
- VERSION = "0.2.6"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ module IsoDoc
6
6
  module Rsd
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
@@ -99,7 +99,7 @@ module IsoDoc
99
99
  def error_parse(node, out)
100
100
  # catch elements not defined in ISO
101
101
  case node.name
102
- when "pre"
102
+ when "pre"
103
103
  pre_parse(node, out)
104
104
  when "keyword"
105
105
  out.span node.text, **{ class: "keyword" }
@@ -2,7 +2,7 @@ module IsoDoc
2
2
  module Rsd
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 "./rsd/processor"
2
+
3
+ module Metanorma
4
+ module Rsd
5
+
6
+ end
7
+ end
@@ -0,0 +1,32 @@
1
+ require "metanorma/processor"
2
+
3
+ module Metanorma
4
+ module Rsd
5
+ class Processor < Metanorma::Processor
6
+
7
+ def initialize
8
+ @short = :rsd
9
+ @input_format = :asciidoc
10
+ @asciidoctor_backend = :rsd
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::Rsd::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-rsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
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-17 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
@@ -329,6 +329,7 @@ extensions: []
329
329
  extra_rdoc_files: []
330
330
  files:
331
331
  - ".gitignore"
332
+ - ".travis.yml"
332
333
  - CODE_OF_CONDUCT.md
333
334
  - Gemfile
334
335
  - Gemfile.lock
@@ -365,6 +366,8 @@ files:
365
366
  - lib/isodoc/rsd/rsdhtmlrender.rb
366
367
  - lib/isodoc/rsd/rsdwordconvert.rb
367
368
  - lib/isodoc/rsd/rsdwordrender.rb
369
+ - lib/metanorma/rsd.rb
370
+ - lib/metanorma/rsd/processor.rb
368
371
  homepage: https://github.com/riboseinc/asciidoctor-rsd
369
372
  licenses:
370
373
  - MIT