metanorma-cli 1.5.2pre → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/cli/command.rb +31 -0
- data/lib/metanorma/cli/version.rb +1 -1
- data/metanorma-cli.gemspec +2 -2
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f22cd8b258957ed9c028be7ceaaf85a32d67b78e857c5e367ca9dd377463b838
|
4
|
+
data.tar.gz: 90c0a7dafd48061c7208adafb618df3d9c083a101e16d2b2c0cfca81325c7fa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c7da7c2a429c30394bd8b65a4a780c96730dabab09fc5360c1fbbb41435f7dd113470b2442e458a0a5632e6b894e63bdf10daa196e2138ea309a99e50176edf
|
7
|
+
data.tar.gz: db61326b2809b9840d7085130e9d0ad1e1f3b4b7ca0db0c441875009593b175ea8cd34c003d5be26a184b5e42c604c94f0f2e654bd8b6d2b5fc332f571a68af5
|
@@ -5,6 +5,7 @@ require "metanorma/cli/thor_with_config"
|
|
5
5
|
require "metanorma/cli/commands/config"
|
6
6
|
require "metanorma/cli/commands/template_repo"
|
7
7
|
require "metanorma/cli/commands/site"
|
8
|
+
require "mnconvert"
|
8
9
|
|
9
10
|
module Metanorma
|
10
11
|
module Cli
|
@@ -77,6 +78,36 @@ module Metanorma
|
|
77
78
|
UI.say e.message
|
78
79
|
end
|
79
80
|
|
81
|
+
desc "convert FILENAME", "Convert STS XML to Metanorma adoc"
|
82
|
+
option :output_format,
|
83
|
+
type: :string,
|
84
|
+
desc: "Output format: xml|adoc|iso|niso"
|
85
|
+
option :output_file, type: :string, desc: "Output file"
|
86
|
+
option :imagesdir,
|
87
|
+
type: :string,
|
88
|
+
desc: "For STS input only: folder with images"
|
89
|
+
option :input_format,
|
90
|
+
type: :string,
|
91
|
+
desc: "Input format: metanorma|sts|rfc"
|
92
|
+
option :debug, type: :boolean, desc: "Enable debug output"
|
93
|
+
option :sts_type,
|
94
|
+
type: :string,
|
95
|
+
desc: "For STS input only: type of standard to generate"
|
96
|
+
option :check_type, type: :string, desc: "Check against XSD/DTD"
|
97
|
+
option :xsl_file, type: :string, desc: "Path to XSL file"
|
98
|
+
option :split_bibdata,
|
99
|
+
type: :boolean,
|
100
|
+
desc: "For STS input only: create MN Adoc and Relaton XML"
|
101
|
+
option :semantic,
|
102
|
+
type: :boolean,
|
103
|
+
desc: "For STS input only: generate semantic XML"
|
104
|
+
|
105
|
+
def convert(inputfile)
|
106
|
+
MnConvert.convert(inputfile, options)
|
107
|
+
rescue Error => e
|
108
|
+
UI.say e.message
|
109
|
+
end
|
110
|
+
|
80
111
|
desc "version", "Version of the code"
|
81
112
|
option :type, aliases: "-t", required: false, desc: "Type of standard to generate"
|
82
113
|
option :format, aliases: "-f", default: :asciidoc, desc: "Format of source file: eg. asciidoc"
|
data/metanorma-cli.gemspec
CHANGED
@@ -23,8 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
spec.required_ruby_version = ">= 2.5.0"
|
25
25
|
|
26
|
-
spec.add_development_dependency "
|
27
|
-
spec.add_development_dependency "pry"
|
26
|
+
spec.add_development_dependency "debug"
|
28
27
|
spec.add_development_dependency "rake", "~> 13.0"
|
29
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
30
29
|
spec.add_development_dependency "rspec-command", "~> 1.0.3"
|
@@ -36,6 +35,7 @@ Gem::Specification.new do |spec|
|
|
36
35
|
spec.add_development_dependency "rubocop", "~> 1.5.2"
|
37
36
|
spec.add_development_dependency "sassc"
|
38
37
|
|
38
|
+
spec.add_runtime_dependency "mnconvert"
|
39
39
|
spec.add_runtime_dependency "metanorma-ietf", "~> 2.5.0"
|
40
40
|
spec.add_runtime_dependency "metanorma-iso", "~> 1.10.0"
|
41
41
|
spec.add_runtime_dependency "thor", "~> 1.0"
|
metadata
CHANGED
@@ -1,31 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
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-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '10.0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '10.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: pry
|
14
|
+
name: debug
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
@@ -164,6 +150,20 @@ dependencies:
|
|
164
150
|
- - ">="
|
165
151
|
- !ruby/object:Gem::Version
|
166
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: mnconvert
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: metanorma-ietf
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -509,9 +509,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
509
509
|
version: 2.5.0
|
510
510
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
511
511
|
requirements:
|
512
|
-
- - "
|
512
|
+
- - ">="
|
513
513
|
- !ruby/object:Gem::Version
|
514
|
-
version:
|
514
|
+
version: '0'
|
515
515
|
requirements: []
|
516
516
|
rubygems_version: 3.2.22
|
517
517
|
signing_key:
|