metanorma-cli 1.9.8 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2a2d9427a79e8b77811528c4ac70f80f048e9936e93164d6966d2396850f25c
|
4
|
+
data.tar.gz: 94eef49ae0187df78ea0296671c3e9b512c9094f9539f64a5699b9ad289186dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '06284155fe55c10aada80c63cbb70f94a3ef297f20b835ab21b74595c9d4a993036d838abce27fc2f60d6cf8f17f710b6bed3212e99912948126c7858e86e606'
|
7
|
+
data.tar.gz: c6037c2db3220a8a8713a237222b1dbe0f31c32741e0de82bedc036b1b5a26f882ef48d11be8151035a2b3f78cd441def68788077d2db01a568011532ef9b0f0
|
@@ -74,9 +74,9 @@ module Metanorma
|
|
74
74
|
|
75
75
|
def xml_extract_options_from_file
|
76
76
|
xml = Nokogiri::XML File.read(@file.to_s, encoding: "UTF-8") { |c| c.huge }
|
77
|
-
{ "coverpage" => xml.at("//
|
78
|
-
"format" => xml.at("//
|
79
|
-
"output_folder" => xml.at("//
|
77
|
+
{ "coverpage" => xml.at("//coverpage"),
|
78
|
+
"format" => xml.at("//format"),
|
79
|
+
"output_folder" => xml.at("//output_folder") }.compact
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
@@ -11,8 +11,8 @@ require "mnconvert"
|
|
11
11
|
module Metanorma
|
12
12
|
module Cli
|
13
13
|
class Command < ThorWithConfig
|
14
|
-
class_option :
|
15
|
-
|
14
|
+
class_option :progress, aliases: "-s", type: :boolean, default: false,
|
15
|
+
desc: "Show progress for long running tasks (like download)"
|
16
16
|
|
17
17
|
desc "new NAME", "Create new Metanorma document"
|
18
18
|
option :type, aliases: "-t", required: true, desc: "Document type"
|
@@ -39,7 +39,7 @@ module Metanorma
|
|
39
39
|
option :strict, aliases: "-S", type: :boolean, desc: "Strict compilation: abort if there are any errors"
|
40
40
|
option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
|
41
41
|
"presented (WARNING: do know what you are agreeing with!)"
|
42
|
-
option :
|
42
|
+
option :install_fonts, type: :boolean, default: true, desc: "Install required fonts"
|
43
43
|
option :continue_without_fonts, type: :boolean, desc: "Continue processing even when fonts are missing"
|
44
44
|
|
45
45
|
def compile(file_name = nil)
|
@@ -64,7 +64,7 @@ module Metanorma
|
|
64
64
|
option :coverpage, aliases: "-c", desc: "Liquid template"
|
65
65
|
option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
|
66
66
|
"presented (WARNING: do know what you are agreeing with!)"
|
67
|
-
option :
|
67
|
+
option :install_fonts, type: :boolean, default: true, desc: "Install required fonts"
|
68
68
|
option :continue_without_fonts, type: :boolean, desc: "Continue processing even when fonts are missing"
|
69
69
|
option :strict, aliases: "-S", type: :boolean, \
|
70
70
|
desc: "Strict compilation: abort if there are any errors"
|
@@ -149,6 +149,10 @@ module Metanorma
|
|
149
149
|
desc "config", "Manage configuration file"
|
150
150
|
subcommand :config, Metanorma::Cli::Commands::Config
|
151
151
|
|
152
|
+
def self.exit_on_failure?
|
153
|
+
true
|
154
|
+
end
|
155
|
+
|
152
156
|
private
|
153
157
|
|
154
158
|
def single_type_extensions(type)
|
@@ -18,7 +18,7 @@ module Metanorma
|
|
18
18
|
)
|
19
19
|
option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
|
20
20
|
"presented (WARNING: do know what you are agreeing with!)"
|
21
|
-
option :
|
21
|
+
option :install_fonts, type: :boolean, default: true, desc: "Install required fonts"
|
22
22
|
option :continue_without_fonts, type: :boolean, desc: "Continue processing even when fonts are missing"
|
23
23
|
option :stylesheet, alias: "-s", desc: "Stylesheet file path for rendering HTML page"
|
24
24
|
option :template_dir, alias: "-t", desc: "Liquid template directory to render site design"
|
@@ -18,9 +18,9 @@ module Metanorma
|
|
18
18
|
def filter_compile_options(options)
|
19
19
|
copts = %w[
|
20
20
|
agree_to_terms
|
21
|
-
|
21
|
+
install_fonts
|
22
22
|
continue_without_fonts
|
23
|
-
|
23
|
+
progress
|
24
24
|
strict
|
25
25
|
]
|
26
26
|
options.select { |k, _| copts.include?(k) }.symbolize_all_keys
|
data/metanorma-cli.gemspec
CHANGED
@@ -49,7 +49,7 @@ Gem::Specification.new do |spec|
|
|
49
49
|
spec.add_runtime_dependency "metanorma-standoc", "~> 2.8.4"
|
50
50
|
# spec.add_runtime_dependency 'metanorma-mpfa', "~> 0.9.0"
|
51
51
|
spec.add_runtime_dependency "git", "~> 1.5"
|
52
|
-
spec.add_runtime_dependency "metanorma", "~>
|
52
|
+
spec.add_runtime_dependency "metanorma", "~> 2.0.0"
|
53
53
|
spec.add_runtime_dependency "metanorma-iho", "~> 0.9.0"
|
54
54
|
spec.add_runtime_dependency "metanorma-itu", "~> 2.4.0"
|
55
55
|
# spec.add_runtime_dependency "metanorma-nist", "~> 2.3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.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: 2024-
|
11
|
+
date: 2024-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -296,14 +296,14 @@ dependencies:
|
|
296
296
|
requirements:
|
297
297
|
- - "~>"
|
298
298
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
299
|
+
version: 2.0.0
|
300
300
|
type: :runtime
|
301
301
|
prerelease: false
|
302
302
|
version_requirements: !ruby/object:Gem::Requirement
|
303
303
|
requirements:
|
304
304
|
- - "~>"
|
305
305
|
- !ruby/object:Gem::Version
|
306
|
-
version:
|
306
|
+
version: 2.0.0
|
307
307
|
- !ruby/object:Gem::Dependency
|
308
308
|
name: metanorma-iho
|
309
309
|
requirement: !ruby/object:Gem::Requirement
|