metanorma 1.5.10 → 1.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/compile.rb +13 -2
- data/lib/metanorma/compile_options.rb +7 -0
- data/lib/metanorma/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90e1529fc811c113969832dbfd36a70a77d8458259e775ad4967475a95bfdaac
|
4
|
+
data.tar.gz: 488a0f5e809991464ee2fa0fe9a6bc4cae50795fac9ca0ea7db76139b0dc84ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 911e73b153257019ad46635218dd5d90f0f1ef85cab5e0a3229603727d3ff7c79b88c8c140b24ad5254b94b97622e5ce9cc4e48b8d15e1442330c3c6c05165b6
|
7
|
+
data.tar.gz: 7c93266f48b1ad6f4bf11a715d9ddcdffdc4b98f910da8ca8c99f55fef412741c40eb2d303e5be92bbfde7b58560b1694f342e1f7026ecac3b1f752e0379ba86
|
data/lib/metanorma/compile.rb
CHANGED
@@ -33,7 +33,6 @@ module Metanorma
|
|
33
33
|
(file, isodoc = process_input(filename, options)) or return nil
|
34
34
|
relaton_export(isodoc, options)
|
35
35
|
extract(isodoc, options[:extract], options[:extract_type])
|
36
|
-
font_install(options)
|
37
36
|
process_exts(filename, extensions, file, isodoc, options)
|
38
37
|
end
|
39
38
|
|
@@ -103,10 +102,22 @@ module Metanorma
|
|
103
102
|
presentationxml: f.sub(/\.[^.]+$/, ".presentation.xml") }
|
104
103
|
@queue = ::Metanorma::WorkersPool
|
105
104
|
.new(ENV["METANORMA_PARALLEL"]&.to_i || 3)
|
105
|
+
gather_and_install_fonts(file, options.dup, extensions)
|
106
|
+
process_exts_run(fnames, file, isodoc, extensions, options)
|
107
|
+
@queue.shutdown
|
108
|
+
end
|
109
|
+
|
110
|
+
def process_exts_run(fnames, file, isodoc, extensions, options)
|
106
111
|
Util.sort_extensions_execution(extensions).each do |ext|
|
107
112
|
process_ext(ext, file, isodoc, fnames, options)
|
108
113
|
end
|
109
|
-
|
114
|
+
end
|
115
|
+
|
116
|
+
def gather_and_install_fonts(file, options, extensions)
|
117
|
+
Util.sort_extensions_execution(extensions).each do |ext|
|
118
|
+
isodoc_options = get_isodoc_options(file, options, ext)
|
119
|
+
font_install(isodoc_options.merge(options))
|
120
|
+
end
|
110
121
|
end
|
111
122
|
|
112
123
|
def process_ext(ext, file, isodoc, fnames, options)
|
@@ -59,9 +59,16 @@ module Metanorma
|
|
59
59
|
return if !opt[:fonts] ||
|
60
60
|
opt[:fontlicenseagreement] == "continue-without-fonts"
|
61
61
|
|
62
|
+
@font_overrides ||= []
|
63
|
+
font_install_override(opt)
|
64
|
+
end
|
65
|
+
|
66
|
+
def font_install_override(opt)
|
62
67
|
confirm = opt[:fontlicenseagreement] == "no-install-fonts" ? "no" : "yes"
|
63
68
|
CSV.parse_line(opt[:fonts], col_sep: ";").map(&:strip).each do |f|
|
69
|
+
@font_overrides.include?(f) and next
|
64
70
|
Fontist::Font.install(f, confirmation: confirm)
|
71
|
+
@font_overrides << f
|
65
72
|
end
|
66
73
|
end
|
67
74
|
|
data/lib/metanorma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|