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 +4 -4
- data/.travis.yml +7 -0
- data/Gemfile.lock +14 -11
- data/lib/asciidoctor-rsd.rb +5 -0
- data/lib/asciidoctor/rsd/converter.rb +1 -1
- data/lib/asciidoctor/rsd/version.rb +1 -1
- data/lib/isodoc/rsd/rsdhtmlconvert.rb +2 -2
- data/lib/isodoc/rsd/rsdhtmlrender.rb +1 -1
- data/lib/isodoc/rsd/rsdwordconvert.rb +1 -0
- data/lib/metanorma/rsd.rb +7 -0
- data/lib/metanorma/rsd/processor.rb +32 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf978ade6b83c1a6c073af687b1eff91a233030d071f292a60ea4c6a3366b4db
|
4
|
+
data.tar.gz: 62078ebc29dab12add1d0bd10a6055c43c9fdb608a0cbf996b6c4ab1c2e67ace
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbd4ce4e7abde3a0d8250795147aa06dcdba862b5bc3a9133a6ae31445ba793a68356aea3d5c7207b73edec85f63b05623cd52492cfc999f5ed1872d353e8e58
|
7
|
+
data.tar.gz: f859f3b6221fe7873e98321f15fc540631f55ee747a01faa60aa8a88aba1ce64270e43908025920a9cac5433a198d3b3a934427eb289a2fa6568fad3557fb843
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/riboseinc/asciidoctor-iso
|
3
|
-
revision:
|
3
|
+
revision: 1fca67f1a4e7a67461ea3999918abc10bca3ca2c
|
4
4
|
specs:
|
5
|
-
asciidoctor-iso (0.
|
5
|
+
asciidoctor-iso (0.9.0)
|
6
6
|
asciidoctor (~> 1.5.7)
|
7
|
-
|
8
|
-
|
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:
|
28
|
+
revision: 601c1870fea386cb54fd8b2f112f680f71bd58a3
|
28
29
|
specs:
|
29
|
-
isodoc (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.
|
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.
|
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.
|
96
|
+
iso-bib-item (0.1.6)
|
97
|
+
duplicate
|
95
98
|
isoics (~> 0.1.6)
|
96
99
|
nokogiri
|
97
|
-
isobib (0.1.
|
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.
|
118
|
+
nokogiri (1.8.3)
|
116
119
|
mini_portile2 (~> 2.3.0)
|
117
120
|
notiffany (0.1.1)
|
118
121
|
nenv (~> 0.1)
|
data/lib/asciidoctor-rsd.rb
CHANGED
@@ -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
|
@@ -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
|
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
|
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]} "
|
@@ -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.
|
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-
|
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
|