metanorma 1.5.10 → 1.5.11
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: 56452832fb95047d0221a3720fba58e82b0d9766c5d29e3b1bacf42e703976ab
|
4
|
+
data.tar.gz: 162cf563a95b6a6ae6f096fcecf4734025a88d5fc50f4b18de8dae693fc986e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3276a5f4445b2776f86bb46beaf4c98d53155f44e2dfa2357b629a879aa36f3d1a621a7789136fac109a76729ca22e0520863d4ad4e5a05f8b3515633dc72ff
|
7
|
+
data.tar.gz: d42e2bbd2ecd3d79fcc7960664f1bfdee03661e78e65109a565e0b21adf9e5613be78eee0859e09b202ed2ce53a820901319150c4255516e2bc73554343d47fc
|
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.11
|
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-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|