metanorma 2.1.10 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af06733dd8691111633e6309c85ebfa069baa2edf16cbd7e8458a17ad34d4b2a
|
4
|
+
data.tar.gz: e924bb9b298cc37c2cebef6f8d9251ae3979e9cd9b537539057a5ade07e11c88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29499feb91dd56f4fe6f281f885263c897fb555a9905ce3a32b56d175199b520e9066041ff96489d5221302c259a08bf0d3c07bde19a232b3893d79a0bde747b
|
7
|
+
data.tar.gz: 717f1409b88dfc565393c71cddb0fda604e062d38e80b45c470dc06957ac5e7cf2f5adfd7ef7083666aeb4f7f7b6356fcbc95014bb2e9091c9c927232d7c225f
|
@@ -6,6 +6,7 @@ require "htmlentities"
|
|
6
6
|
require "yaml"
|
7
7
|
require "fontist"
|
8
8
|
require "fontist/manifest/install"
|
9
|
+
require "metanorma-taste"
|
9
10
|
require_relative "writeable"
|
10
11
|
require_relative "validator"
|
11
12
|
require_relative "compile_options"
|
@@ -182,17 +183,11 @@ module Metanorma
|
|
182
183
|
"#{attrs.join("\n")}\n\n#{rest}"
|
183
184
|
end
|
184
185
|
|
185
|
-
# TODO: to config
|
186
186
|
def process_input_adoc_overrides(attrs, options)
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
":publisher: International Color Consortium",
|
192
|
-
":publisher_abbr: ICC"].each { |a| attrs << a }
|
193
|
-
options[":boilerplate-authority:"] = f
|
194
|
-
end
|
195
|
-
attrs
|
187
|
+
@registry.tastes.available_tastes.include?(options[:supplied_type]) or
|
188
|
+
return
|
189
|
+
c = Metanorma::TasteRegister.get(options[:supplied_type])
|
190
|
+
c.process_input_adoc_overrides(attrs, options)
|
196
191
|
end
|
197
192
|
|
198
193
|
def process_input_adoc_includes(file, filename)
|
@@ -92,8 +92,7 @@ module Metanorma
|
|
92
92
|
|
93
93
|
def get_isodoc_options(file, options, ext)
|
94
94
|
ret = @processor.extract_options(file)
|
95
|
-
|
96
|
-
ret[:i18nyaml] &&= File.join(dir, ret[:i18nyaml])
|
95
|
+
get_isodoc_i18nyaml(options, ret)
|
97
96
|
copy_isodoc_options_attrs(options, ret)
|
98
97
|
font_manifest_mn2pdf(options, ret, ext)
|
99
98
|
ret[:output_formats]&.select! do |k, _|
|
@@ -103,6 +102,13 @@ module Metanorma
|
|
103
102
|
ret
|
104
103
|
end
|
105
104
|
|
105
|
+
def get_isodoc_i18nyaml(options, ret)
|
106
|
+
dir = File.dirname(options[:filename])
|
107
|
+
ret[:i18nyaml] or return
|
108
|
+
(Pathname.new ret[:i18nyaml]).absolute? or
|
109
|
+
ret[:i18nyaml] = File.join(dir, ret[:i18nyaml])
|
110
|
+
end
|
111
|
+
|
106
112
|
def copy_isodoc_options_attrs(options, ret)
|
107
113
|
ret[:datauriimage] = true if options[:datauriimage]
|
108
114
|
ret[:sourcefilename] = options[:filename]
|
@@ -55,6 +55,7 @@ module Metanorma
|
|
55
55
|
pdf-owner-password pdf-allow-copy-content pdf-allow-edit-content
|
56
56
|
pdf-allow-assemble-document pdf-allow-edit-annotations
|
57
57
|
pdf-allow-print pdf-allow-print-hq pdf-allow-fill-in-forms
|
58
|
+
pdf-stylesheet pdf-stylesheet-override
|
58
59
|
fonts font-license-agreement pdf-allow-access-content
|
59
60
|
pdf-encrypt-metadata iso-word-template document-scheme
|
60
61
|
localize-number iso-word-bg-strip-color modspec-identifier-base)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# Registry of all Metanorma types and entry points
|
2
2
|
|
3
3
|
require "singleton"
|
4
|
+
require "metanorma-taste"
|
4
5
|
|
5
6
|
class Error < StandardError
|
6
7
|
end
|
@@ -9,13 +10,17 @@ module Metanorma
|
|
9
10
|
class Registry
|
10
11
|
include Singleton
|
11
12
|
|
12
|
-
attr_reader :processors
|
13
|
+
attr_reader :processors, :tastes
|
13
14
|
|
14
15
|
# TODO: make aliases configurable
|
15
16
|
def initialize
|
16
17
|
@processors = {}
|
17
|
-
@
|
18
|
-
|
18
|
+
@tastes = Metanorma::TasteRegister.instance
|
19
|
+
tastealiases = @tastes.available_tastes.each_with_object({}) do |x, m|
|
20
|
+
m[x] = @tastes.taste_info(x)[:base_flavor]
|
21
|
+
end
|
22
|
+
@aliases = { csd: :cc, m3d: :m3aawg, mpfd: :mpfa, csand: :csa }
|
23
|
+
.merge tastealiases
|
19
24
|
end
|
20
25
|
|
21
26
|
def alias(flavour)
|
data/lib/metanorma/version.rb
CHANGED
data/metanorma.gemspec
CHANGED
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_runtime_dependency "fontist", ">= 1.14.3"
|
30
30
|
spec.add_runtime_dependency "htmlentities"
|
31
31
|
spec.add_runtime_dependency "isodoc", ">= 3.0.0"
|
32
|
+
spec.add_runtime_dependency "metanorma-taste"
|
32
33
|
spec.add_runtime_dependency "mn2pdf", "~> 2"
|
33
34
|
spec.add_runtime_dependency "nokogiri"
|
34
35
|
|
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: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 3.0.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: metanorma-taste
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: mn2pdf
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|