asciidoctor-csand 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +7 -0
- data/Gemfile.lock +35 -24
- data/asciidoctor-csand.gemspec +3 -2
- data/lib/asciidoctor/csand/biblio.rng +35 -6
- data/lib/asciidoctor/csand/converter.rb +1 -1
- data/lib/asciidoctor/csand/csand.rng +14 -0
- data/lib/asciidoctor/csand/isodoc.rng +1 -1
- data/lib/asciidoctor/csand/isostandard.rng +63 -14
- data/lib/asciidoctor/csand/version.rb +1 -1
- data/lib/isodoc/csand/csandconvert.rb +10 -49
- data/lib/isodoc/csand/html/csa-logo-white.png +0 -0
- data/lib/isodoc/csand/html/csa.png +0 -0
- data/lib/isodoc/csand/html/html_csand_titlepage.html +12 -10
- data/lib/isodoc/csand/html/htmlstyle.scss +230 -125
- data/lib/isodoc/csand/html/scripts.html +1 -9
- data/lib/isodoc/csand/metadata.rb +56 -0
- metadata +11 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5452725006b85a3c51448bb2a31d778c3070727712d9fcfa5d768742744c8c73
|
4
|
+
data.tar.gz: ffec7ab9cc922a2c7b7a50c6ff5049b008ebff77bc11e75f9916e44451c57640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e984fd1a66073d97657a8bd37687904cbb837afdf3a5087634424f04f8a66df867dafecdf46b29a2c4c790aa71879897e752dc044dd094f55fec7599d00bab0
|
7
|
+
data.tar.gz: e1a8d13cd3a525634e382ad94af3b131243989571418f116056c300aba88ddc8932729d7f206adaea1f3f8c5141edbb83c66a4686ae83b526a58ec6aaa429990
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,25 +1,20 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/riboseinc/asciidoctor-iso
|
3
|
-
revision:
|
3
|
+
revision: 8cc05dd17f42f68102e39f84f122775a801f403f
|
4
4
|
specs:
|
5
|
-
asciidoctor-iso (0.
|
6
|
-
asciidoctor (~> 1.5.
|
7
|
-
|
8
|
-
|
9
|
-
isodoc
|
10
|
-
nokogiri
|
5
|
+
asciidoctor-iso (0.8.2)
|
6
|
+
asciidoctor (~> 1.5.7)
|
7
|
+
isobib (~> 0.1.4)
|
8
|
+
isodoc (>= 0.7.0)
|
11
9
|
ruby-jing
|
12
|
-
sass
|
13
|
-
thread_safe
|
14
|
-
uuidtools
|
15
10
|
|
16
11
|
GIT
|
17
12
|
remote: https://github.com/riboseinc/isodoc
|
18
|
-
revision:
|
13
|
+
revision: d2e9d051f6c517b9ddec814a259b0f44c7e5c971
|
19
14
|
specs:
|
20
|
-
isodoc (0.
|
15
|
+
isodoc (0.7.1)
|
21
16
|
asciimath
|
22
|
-
html2doc
|
17
|
+
html2doc (>= 0.7.1)
|
23
18
|
htmlentities (~> 4.3.4)
|
24
19
|
image_size
|
25
20
|
liquid
|
@@ -27,19 +22,20 @@ GIT
|
|
27
22
|
nokogiri
|
28
23
|
roman-numerals
|
29
24
|
ruby-xslt
|
25
|
+
sass
|
30
26
|
thread_safe
|
31
27
|
uuidtools
|
32
28
|
|
33
29
|
PATH
|
34
30
|
remote: .
|
35
31
|
specs:
|
36
|
-
asciidoctor-csand (0.2.
|
32
|
+
asciidoctor-csand (0.2.7)
|
37
33
|
asciidoctor (~> 1.5.7)
|
38
|
-
asciidoctor-iso (>= 0.
|
34
|
+
asciidoctor-iso (>= 0.8.0)
|
39
35
|
asciimath
|
40
36
|
htmlentities (~> 4.3.4)
|
41
37
|
image_size
|
42
|
-
isodoc
|
38
|
+
isodoc (>= 0.7.0)
|
43
39
|
mime-types
|
44
40
|
nokogiri
|
45
41
|
ruby-jing
|
@@ -50,16 +46,20 @@ PATH
|
|
50
46
|
GEM
|
51
47
|
remote: https://rubygems.org/
|
52
48
|
specs:
|
49
|
+
algoliasearch (1.22.0)
|
50
|
+
httpclient (~> 2.8, >= 2.8.3)
|
51
|
+
json (>= 1.5.1)
|
53
52
|
asciidoctor (1.5.7.1)
|
54
53
|
asciimath (1.0.4)
|
55
54
|
ast (2.4.0)
|
56
55
|
byebug (9.1.0)
|
57
56
|
coderay (1.1.2)
|
58
57
|
diff-lcs (1.3)
|
59
|
-
docile (1.3.
|
58
|
+
docile (1.3.1)
|
59
|
+
duplicate (1.1.1)
|
60
60
|
equivalent-xml (0.6.0)
|
61
61
|
nokogiri (>= 1.4.3)
|
62
|
-
ffi (1.9.
|
62
|
+
ffi (1.9.25)
|
63
63
|
formatador (0.2.5)
|
64
64
|
guard (2.14.2)
|
65
65
|
formatador (>= 0.2.4)
|
@@ -75,7 +75,7 @@ GEM
|
|
75
75
|
guard (~> 2.1)
|
76
76
|
guard-compat (~> 1.1)
|
77
77
|
rspec (>= 2.99.0, < 4.0)
|
78
|
-
html2doc (0.
|
78
|
+
html2doc (0.8.0)
|
79
79
|
asciimath
|
80
80
|
htmlentities (~> 4.3.4)
|
81
81
|
image_size
|
@@ -85,7 +85,17 @@ GEM
|
|
85
85
|
thread_safe
|
86
86
|
uuidtools
|
87
87
|
htmlentities (4.3.4)
|
88
|
+
httpclient (2.8.3)
|
88
89
|
image_size (2.0.0)
|
90
|
+
iso-bib-item (0.1.5)
|
91
|
+
duplicate
|
92
|
+
isoics (~> 0.1.6)
|
93
|
+
nokogiri
|
94
|
+
isobib (0.1.6)
|
95
|
+
algoliasearch
|
96
|
+
iso-bib-item (~> 0.1.2)
|
97
|
+
isoics (0.1.6)
|
98
|
+
jaro_winkler (1.5.1)
|
89
99
|
json (2.1.0)
|
90
100
|
liquid (4.0.0)
|
91
101
|
listen (3.1.5)
|
@@ -99,7 +109,7 @@ GEM
|
|
99
109
|
mime-types-data (3.2016.0521)
|
100
110
|
mini_portile2 (2.3.0)
|
101
111
|
nenv (0.3.0)
|
102
|
-
nokogiri (1.8.
|
112
|
+
nokogiri (1.8.3)
|
103
113
|
mini_portile2 (~> 2.3.0)
|
104
114
|
notiffany (0.1.1)
|
105
115
|
nenv (~> 0.1)
|
@@ -108,7 +118,7 @@ GEM
|
|
108
118
|
parallel (1.12.1)
|
109
119
|
parser (2.5.1.0)
|
110
120
|
ast (~> 2.4.0)
|
111
|
-
powerpack (0.1.
|
121
|
+
powerpack (0.1.2)
|
112
122
|
pry (0.11.3)
|
113
123
|
coderay (~> 1.1.0)
|
114
124
|
method_source (~> 0.9.0)
|
@@ -131,7 +141,8 @@ GEM
|
|
131
141
|
diff-lcs (>= 1.2.0, < 2.0)
|
132
142
|
rspec-support (~> 3.7.0)
|
133
143
|
rspec-support (3.7.1)
|
134
|
-
rubocop (0.
|
144
|
+
rubocop (0.57.2)
|
145
|
+
jaro_winkler (~> 1.5.1)
|
135
146
|
parallel (~> 1.10)
|
136
147
|
parser (>= 2.5)
|
137
148
|
powerpack (~> 0.1)
|
@@ -157,7 +168,7 @@ GEM
|
|
157
168
|
thor (0.20.0)
|
158
169
|
thread_safe (0.3.6)
|
159
170
|
timecop (0.9.1)
|
160
|
-
unicode-display_width (1.
|
171
|
+
unicode-display_width (1.4.0)
|
161
172
|
uuidtools (2.1.5)
|
162
173
|
|
163
174
|
PLATFORMS
|
@@ -179,4 +190,4 @@ DEPENDENCIES
|
|
179
190
|
timecop (~> 0.9)
|
180
191
|
|
181
192
|
BUNDLED WITH
|
182
|
-
1.16.
|
193
|
+
1.16.2
|
data/asciidoctor-csand.gemspec
CHANGED
@@ -35,8 +35,9 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_dependency "ruby-xslt"
|
36
36
|
spec.add_dependency "thread_safe"
|
37
37
|
spec.add_dependency "uuidtools"
|
38
|
-
|
39
|
-
spec.add_dependency "
|
38
|
+
|
39
|
+
spec.add_dependency "asciidoctor-iso", ">= 0.8.0"
|
40
|
+
spec.add_dependency "isodoc", ">= 0.7.0"
|
40
41
|
|
41
42
|
spec.add_development_dependency "bundler", "~> 1.15"
|
42
43
|
spec.add_development_dependency "byebug", "~> 9.1"
|
@@ -442,9 +442,9 @@
|
|
442
442
|
<optional>
|
443
443
|
<ref name="status"/>
|
444
444
|
</optional>
|
445
|
-
<
|
445
|
+
<zeroOrMore>
|
446
446
|
<ref name="copyright"/>
|
447
|
-
</
|
447
|
+
</zeroOrMore>
|
448
448
|
<zeroOrMore>
|
449
449
|
<ref name="docrelation"/>
|
450
450
|
</zeroOrMore>
|
@@ -489,10 +489,31 @@
|
|
489
489
|
<value>issued</value>
|
490
490
|
</choice>
|
491
491
|
</attribute>
|
492
|
-
|
493
|
-
<
|
494
|
-
<
|
495
|
-
|
492
|
+
<!-- ( ( bfrom, bto? ) | date_on ) -->
|
493
|
+
<choice>
|
494
|
+
<group>
|
495
|
+
<element name="from">
|
496
|
+
<choice>
|
497
|
+
<data type="gYear"/>
|
498
|
+
<data type="date"/>
|
499
|
+
</choice>
|
500
|
+
</element>
|
501
|
+
<optional>
|
502
|
+
<element name="to">
|
503
|
+
<choice>
|
504
|
+
<data type="gYear"/>
|
505
|
+
<data type="date"/>
|
506
|
+
</choice>
|
507
|
+
</element>
|
508
|
+
</optional>
|
509
|
+
</group>
|
510
|
+
<element name="on">
|
511
|
+
<choice>
|
512
|
+
<data type="gYear"/>
|
513
|
+
<data type="date"/>
|
514
|
+
</choice>
|
515
|
+
</element>
|
516
|
+
</choice>
|
496
517
|
</element>
|
497
518
|
</define>
|
498
519
|
<define name="bfrom">
|
@@ -511,6 +532,14 @@
|
|
511
532
|
</choice>
|
512
533
|
</element>
|
513
534
|
</define>
|
535
|
+
<define name="date_on">
|
536
|
+
<element name="on">
|
537
|
+
<choice>
|
538
|
+
<data type="gYear"/>
|
539
|
+
<data type="date"/>
|
540
|
+
</choice>
|
541
|
+
</element>
|
542
|
+
</define>
|
514
543
|
<define name="docidentifier">
|
515
544
|
<element name="docidentifier">
|
516
545
|
<optional>
|
@@ -56,6 +56,20 @@
|
|
56
56
|
</choice>
|
57
57
|
</element>
|
58
58
|
</define>
|
59
|
+
<define name="status">
|
60
|
+
<element name="status">
|
61
|
+
<choice>
|
62
|
+
<value>proposal</value>
|
63
|
+
<value>working-draft</value>
|
64
|
+
<value>committee-draft</value>
|
65
|
+
<value>draft-standard</value>
|
66
|
+
<value>final-draft</value>
|
67
|
+
<value>published</value>
|
68
|
+
<value>withdrawn</value>
|
69
|
+
<ref name="LocalizedString"/>
|
70
|
+
</choice>
|
71
|
+
</element>
|
72
|
+
</define>
|
59
73
|
<!-- TextElement |= keyword -->
|
60
74
|
<define name="TextElement">
|
61
75
|
<choice>
|
@@ -72,9 +72,9 @@
|
|
72
72
|
</oneOrMore>
|
73
73
|
<ref name="formattedref"/>
|
74
74
|
</choice>
|
75
|
-
<
|
75
|
+
<zeroOrMore>
|
76
76
|
<ref name="bsource"/>
|
77
|
-
</
|
77
|
+
</zeroOrMore>
|
78
78
|
<zeroOrMore>
|
79
79
|
<ref name="docidentifier"/>
|
80
80
|
</zeroOrMore>
|
@@ -96,9 +96,9 @@
|
|
96
96
|
<zeroOrMore>
|
97
97
|
<ref name="script"/>
|
98
98
|
</zeroOrMore>
|
99
|
-
<
|
99
|
+
<zeroOrMore>
|
100
100
|
<ref name="abstract"/>
|
101
|
-
</
|
101
|
+
</zeroOrMore>
|
102
102
|
<optional>
|
103
103
|
<ref name="status"/>
|
104
104
|
</optional>
|
@@ -114,6 +114,9 @@
|
|
114
114
|
<zeroOrMore>
|
115
115
|
<ref name="ics"/>
|
116
116
|
</zeroOrMore>
|
117
|
+
<optional>
|
118
|
+
<ref name="allParts"/>
|
119
|
+
</optional>
|
117
120
|
</define>
|
118
121
|
<define name="BibData">
|
119
122
|
<optional>
|
@@ -127,9 +130,9 @@
|
|
127
130
|
<optional>
|
128
131
|
<ref name="formattedref"/>
|
129
132
|
</optional>
|
130
|
-
<
|
133
|
+
<zeroOrMore>
|
131
134
|
<ref name="bsource"/>
|
132
|
-
</
|
135
|
+
</zeroOrMore>
|
133
136
|
<zeroOrMore>
|
134
137
|
<ref name="docidentifier"/>
|
135
138
|
</zeroOrMore>
|
@@ -151,9 +154,9 @@
|
|
151
154
|
<zeroOrMore>
|
152
155
|
<ref name="script"/>
|
153
156
|
</zeroOrMore>
|
154
|
-
<
|
157
|
+
<zeroOrMore>
|
155
158
|
<ref name="abstract"/>
|
156
|
-
</
|
159
|
+
</zeroOrMore>
|
157
160
|
<optional>
|
158
161
|
<ref name="status"/>
|
159
162
|
</optional>
|
@@ -165,13 +168,49 @@
|
|
165
168
|
<zeroOrMore>
|
166
169
|
<ref name="ics"/>
|
167
170
|
</zeroOrMore>
|
171
|
+
<optional>
|
172
|
+
<ref name="allParts"/>
|
173
|
+
</optional>
|
168
174
|
</define>
|
169
|
-
<define name="
|
170
|
-
<element name="
|
175
|
+
<define name="bdate">
|
176
|
+
<element name="date">
|
177
|
+
<attribute name="type">
|
178
|
+
<choice>
|
179
|
+
<value>published</value>
|
180
|
+
<value>accessed</value>
|
181
|
+
<value>created</value>
|
182
|
+
<value>implemented</value>
|
183
|
+
<value>obsoleted</value>
|
184
|
+
<value>confirmed</value>
|
185
|
+
<value>updated</value>
|
186
|
+
<value>issued</value>
|
187
|
+
</choice>
|
188
|
+
</attribute>
|
189
|
+
<!-- ( ( bfrom, bto? ) | date_on ) -->
|
171
190
|
<choice>
|
172
|
-
<
|
173
|
-
|
174
|
-
|
191
|
+
<group>
|
192
|
+
<element name="from">
|
193
|
+
<choice>
|
194
|
+
<data type="gYear"/>
|
195
|
+
<data type="date"/>
|
196
|
+
</choice>
|
197
|
+
</element>
|
198
|
+
<optional>
|
199
|
+
<element name="to">
|
200
|
+
<choice>
|
201
|
+
<data type="gYear"/>
|
202
|
+
<data type="date"/>
|
203
|
+
</choice>
|
204
|
+
</element>
|
205
|
+
</optional>
|
206
|
+
</group>
|
207
|
+
<element name="on">
|
208
|
+
<choice>
|
209
|
+
<data type="gYear"/>
|
210
|
+
<data type="date"/>
|
211
|
+
<value>--</value>
|
212
|
+
</choice>
|
213
|
+
</element>
|
175
214
|
</choice>
|
176
215
|
</element>
|
177
216
|
</define>
|
@@ -819,6 +858,11 @@
|
|
819
858
|
<ref name="FormattedString"/>
|
820
859
|
</element>
|
821
860
|
</define>
|
861
|
+
<define name="allParts">
|
862
|
+
<element name="allParts">
|
863
|
+
<data type="boolean"/>
|
864
|
+
</element>
|
865
|
+
</define>
|
822
866
|
<define name="clause-hanging-paragraph-with-footnote">
|
823
867
|
<element name="clause">
|
824
868
|
<optional>
|
@@ -872,7 +916,12 @@
|
|
872
916
|
</define>
|
873
917
|
<define name="ics">
|
874
918
|
<element name="ics">
|
875
|
-
<
|
919
|
+
<element name="code">
|
920
|
+
<text/>
|
921
|
+
</element>
|
922
|
+
<element name="text">
|
923
|
+
<text/>
|
924
|
+
</element>
|
876
925
|
</element>
|
877
926
|
</define>
|
878
927
|
<define name="term-clause">
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "isodoc"
|
2
|
+
require_relative "metadata"
|
2
3
|
|
3
4
|
module IsoDoc
|
4
5
|
module Csand
|
@@ -16,64 +17,21 @@ module IsoDoc
|
|
16
17
|
@htmlcoverpage = html_doc_path("html_csand_titlepage.html")
|
17
18
|
@htmlintropage = html_doc_path("html_csand_intro.html")
|
18
19
|
@scripts = html_doc_path("scripts.html")
|
19
|
-
set_metadata(:status, "XXX")
|
20
20
|
end
|
21
21
|
|
22
22
|
def default_fonts(options)
|
23
23
|
b = options[:bodyfont] ||
|
24
24
|
(options[:script] == "Hans" ? '"SimSun",serif' :
|
25
|
-
'"
|
25
|
+
'"Source Sans Pro",sans-serif')
|
26
26
|
h = options[:headerfont] ||
|
27
27
|
(options[:script] == "Hans" ? '"SimHei",sans-serif' :
|
28
|
-
'"
|
28
|
+
'"Source Sans Pro",sans-serif')
|
29
29
|
m = options[:monospacefont] || '"Space Mono",monospace'
|
30
30
|
"$bodyfont: #{b};\n$headerfont: #{h};\n$monospacefont: #{m};\n"
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
def title(isoxml, _out)
|
38
|
-
main = isoxml&.at(ns("//title[@language='en']"))&.text
|
39
|
-
set_metadata(:doctitle, main)
|
40
|
-
end
|
41
|
-
|
42
|
-
def subtitle(_isoxml, _out)
|
43
|
-
nil
|
44
|
-
end
|
45
|
-
|
46
|
-
def author(isoxml, _out)
|
47
|
-
set_metadata(:tc, "XXXX")
|
48
|
-
tc = isoxml.at(ns("//editorialgroup/technical-committee"))
|
49
|
-
set_metadata(:tc, tc.text) if tc
|
50
|
-
end
|
51
|
-
|
52
|
-
|
53
|
-
def docid(isoxml, _out)
|
54
|
-
docnumber = isoxml.at(ns("//bibdata/docidentifier"))
|
55
|
-
docstatus = isoxml.at(ns("//bibdata/status"))
|
56
|
-
dn = docnumber&.text
|
57
|
-
if docstatus
|
58
|
-
set_metadata(:status, status_print(docstatus.text))
|
59
|
-
abbr = status_abbr(docstatus.text)
|
60
|
-
dn = "#{dn}(#{abbr})" unless abbr.empty?
|
61
|
-
end
|
62
|
-
set_metadata(:docnumber, dn)
|
63
|
-
end
|
64
|
-
|
65
|
-
def status_print(status)
|
66
|
-
status.split(/-/).map{ |w| w.capitalize }.join(" ")
|
67
|
-
end
|
68
|
-
|
69
|
-
def status_abbr(status)
|
70
|
-
case status
|
71
|
-
when "working-draft" then "wd"
|
72
|
-
when "committee-draft" then "cd"
|
73
|
-
when "draft-standard" then "d"
|
74
|
-
else
|
75
|
-
""
|
76
|
-
end
|
33
|
+
def metadata_init(lang, script, labels)
|
34
|
+
@meta = Metadata.new(lang, script, labels)
|
77
35
|
end
|
78
36
|
|
79
37
|
def annex_name(annex, name, div)
|
@@ -93,7 +51,7 @@ module IsoDoc
|
|
93
51
|
out.pre node.text # content.gsub(/</, "<").gsub(/>/, ">")
|
94
52
|
end
|
95
53
|
|
96
|
-
def term_defs_boilerplate(div, source, term)
|
54
|
+
def term_defs_boilerplate(div, source, term, preface)
|
97
55
|
if source.empty? && term.nil?
|
98
56
|
div << @no_terms_boilerplate
|
99
57
|
else
|
@@ -127,7 +85,10 @@ module IsoDoc
|
|
127
85
|
|
128
86
|
<!--Google fonts-->
|
129
87
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
|
130
|
-
<link href="https://fonts.googleapis.com/css?family=
|
88
|
+
<link href="https://fonts.googleapis.com/css?family=Rubik:300,300i,500" rel="stylesheet">
|
89
|
+
<link href="https://fonts.googleapis.com/css?family=Overpass:100,300,300i,600,900" rel="stylesheet">
|
90
|
+
|
91
|
+
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,700,900" rel="stylesheet">
|
131
92
|
<!--Font awesome import for the link icon-->
|
132
93
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/solid.css" integrity="sha384-v2Tw72dyUXeU3y4aM2Y0tBJQkGfplr39mxZqlTBDUZAb9BGoC40+rdFCG0m10lXk" crossorigin="anonymous">
|
133
94
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.8/css/fontawesome.css" integrity="sha384-q3jl8XQu1OpdLgGFvNRnPdj5VIlCvgsDQTQB6owSOHWlAurxul7f+JpUOVdAiJ5P" crossorigin="anonymous">
|