metanorma-itu 1.2.12 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +9 -32
- data/.gitignore +2 -0
- data/.rubocop.yml +6 -2
- data/lib/asciidoctor/itu/biblio.rng +4 -6
- data/lib/asciidoctor/itu/cleanup.rb +9 -6
- data/lib/asciidoctor/itu/converter.rb +13 -15
- data/lib/asciidoctor/itu/isodoc.rng +235 -3
- data/lib/asciidoctor/itu/itu.rng +6 -30
- data/lib/isodoc/itu/base_convert.rb +25 -37
- data/lib/isodoc/itu/html/_coverpage.css +7 -0
- data/lib/isodoc/itu/html/htmlstyle.css +14 -7
- data/lib/isodoc/itu/html/htmlstyle.scss +0 -9
- data/lib/isodoc/itu/html/itu.css +0 -7
- data/lib/isodoc/itu/html/itu.scss +0 -7
- data/lib/isodoc/itu/html_convert.rb +0 -1
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +80 -0
- data/lib/isodoc/itu/i18n.rb +4 -1
- data/lib/isodoc/itu/itu.implementers-guide.xsl +5915 -0
- data/lib/isodoc/itu/itu.in-force.xsl +5915 -0
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +618 -286
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +5915 -0
- data/lib/isodoc/itu/itu.recommendation.xsl +618 -286
- data/lib/isodoc/itu/itu.resolution.xsl +618 -286
- data/lib/isodoc/itu/itu.technical-paper.xsl +618 -286
- data/lib/isodoc/itu/itu.technical-report.xsl +618 -286
- data/lib/isodoc/itu/pdf_convert.rb +5 -8
- data/lib/isodoc/itu/presentation_xml_convert.rb +1 -1
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +6 -6
- metadata +37 -34
- data/lib/asciidoctor/itu/macros.rb +0 -27
@@ -13,14 +13,11 @@ module IsoDoc
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def pdf_stylesheet(docxml)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
else
|
22
|
-
"itu.recommendation.xsl"
|
23
|
-
end
|
16
|
+
doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
|
17
|
+
|
18
|
+
"itu.#{doctype}.xsl" if File.exist?(File.join(@libdir, "itu.#{doctype}.xsl"))
|
19
|
+
|
20
|
+
"itu.recommendation.xsl"
|
24
21
|
end
|
25
22
|
end
|
26
23
|
end
|
@@ -48,7 +48,7 @@ module IsoDoc
|
|
48
48
|
return unless contents.empty?
|
49
49
|
link = anchor_linkend(node, docid_l10n(node["target"] || node["citeas"]))
|
50
50
|
link && !/^\[.*\]$/.match(link) and link = "[#{link}]"
|
51
|
-
link += eref_localities(node.xpath(ns("./locality | ./localityStack")), link)
|
51
|
+
link += eref_localities(node.xpath(ns("./locality | ./localityStack")), link, node)
|
52
52
|
non_locality_elems(node).each { |n| n.remove }
|
53
53
|
node.add_child(link)
|
54
54
|
end
|
data/metanorma-itu.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
lib = File.expand_path("
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
require "metanorma/itu/version"
|
4
4
|
|
@@ -25,20 +25,20 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
26
26
|
|
27
27
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
28
|
+
spec.add_dependency "isodoc", "~> 1.6.0"
|
29
|
+
spec.add_dependency "metanorma-standoc", "~> 1.9.0"
|
28
30
|
spec.add_dependency "ruby-jing"
|
29
|
-
spec.add_dependency "metanorma-standoc", "~> 1.8.0"
|
30
|
-
spec.add_dependency "isodoc", "~> 1.5.0"
|
31
31
|
spec.add_dependency "twitter_cldr"
|
32
32
|
spec.add_dependency "tzinfo-data" # we need this for windows only
|
33
33
|
|
34
34
|
spec.add_development_dependency "byebug", "~> 9.1"
|
35
|
-
spec.add_development_dependency "sassc", "2.4.0"
|
36
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
37
36
|
spec.add_development_dependency "guard", "~> 2.14"
|
38
37
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
39
|
-
spec.add_development_dependency "rake", "~>
|
38
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
40
39
|
spec.add_development_dependency "rspec", "~> 3.6"
|
41
|
-
spec.add_development_dependency "rubocop", "
|
40
|
+
spec.add_development_dependency "rubocop", "~> 1.5.2"
|
41
|
+
spec.add_development_dependency "sassc", "2.4.0"
|
42
42
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
43
43
|
spec.add_development_dependency "timecop", "~> 0.9"
|
44
44
|
spec.add_development_dependency "vcr", "~> 5.0.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.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: 2021-
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -25,47 +25,47 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.3.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: isodoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.6.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.6.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: metanorma-standoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.9.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.9.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: ruby-jing
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: twitter_cldr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '9.1'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: sassc
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - '='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 2.4.0
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - '='
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 2.4.0
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: equivalent-xml
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +156,14 @@ dependencies:
|
|
170
156
|
requirements:
|
171
157
|
- - "~>"
|
172
158
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
159
|
+
version: '13.0'
|
174
160
|
type: :development
|
175
161
|
prerelease: false
|
176
162
|
version_requirements: !ruby/object:Gem::Requirement
|
177
163
|
requirements:
|
178
164
|
- - "~>"
|
179
165
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
166
|
+
version: '13.0'
|
181
167
|
- !ruby/object:Gem::Dependency
|
182
168
|
name: rspec
|
183
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,18 +180,32 @@ dependencies:
|
|
194
180
|
version: '3.6'
|
195
181
|
- !ruby/object:Gem::Dependency
|
196
182
|
name: rubocop
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 1.5.2
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 1.5.2
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: sassc
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - '='
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
201
|
+
version: 2.4.0
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - '='
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
208
|
+
version: 2.4.0
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: simplecov
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -292,7 +292,6 @@ files:
|
|
292
292
|
- lib/asciidoctor/itu/front.rb
|
293
293
|
- lib/asciidoctor/itu/isodoc.rng
|
294
294
|
- lib/asciidoctor/itu/itu.rng
|
295
|
-
- lib/asciidoctor/itu/macros.rb
|
296
295
|
- lib/asciidoctor/itu/reqt.rng
|
297
296
|
- lib/asciidoctor/itu/validate.rb
|
298
297
|
- lib/isodoc/itu.rb
|
@@ -320,9 +319,13 @@ files:
|
|
320
319
|
- lib/isodoc/itu/html/wordstyle.scss
|
321
320
|
- lib/isodoc/itu/html_convert.rb
|
322
321
|
- lib/isodoc/itu/i18n-en.yaml
|
322
|
+
- lib/isodoc/itu/i18n-zh-Hans.yaml
|
323
323
|
- lib/isodoc/itu/i18n.rb
|
324
324
|
- lib/isodoc/itu/init.rb
|
325
|
+
- lib/isodoc/itu/itu.implementers-guide.xsl
|
326
|
+
- lib/isodoc/itu/itu.in-force.xsl
|
325
327
|
- lib/isodoc/itu/itu.recommendation-annex.xsl
|
328
|
+
- lib/isodoc/itu/itu.recommendation-supplement.xsl
|
326
329
|
- lib/isodoc/itu/itu.recommendation.xsl
|
327
330
|
- lib/isodoc/itu/itu.resolution.xsl
|
328
331
|
- lib/isodoc/itu/itu.technical-paper.xsl
|
@@ -359,7 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
362
|
- !ruby/object:Gem::Version
|
360
363
|
version: '0'
|
361
364
|
requirements: []
|
362
|
-
rubygems_version: 3.
|
365
|
+
rubygems_version: 3.1.4
|
363
366
|
signing_key:
|
364
367
|
specification_version: 4
|
365
368
|
summary: Metanorma for the ITU
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Asciidoctor
|
2
|
-
module ITU
|
3
|
-
class AddMacro < Asciidoctor::Extensions::InlineMacroProcessor
|
4
|
-
use_dsl
|
5
|
-
named :add
|
6
|
-
parse_content_as :text
|
7
|
-
using_format :short
|
8
|
-
|
9
|
-
def process(parent, _target, attrs)
|
10
|
-
out = Asciidoctor::Inline.new(parent, :quoted, attrs["text"]).convert
|
11
|
-
%{<add>#{out}</add>}
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
class DelMacro < Asciidoctor::Extensions::InlineMacroProcessor
|
16
|
-
use_dsl
|
17
|
-
named :del
|
18
|
-
parse_content_as :text
|
19
|
-
using_format :short
|
20
|
-
|
21
|
-
def process(parent, _target, attrs)
|
22
|
-
out = Asciidoctor::Inline.new(parent, :quoted, attrs["text"]).convert
|
23
|
-
%{<del>#{out}</del>}
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|