metanorma-cli 1.5.1 → 1.5.3pre1
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: 2b30701b2ca783571d497de62a3d444b6ed716b92b4dbb63a67a8991c28cc56d
|
4
|
+
data.tar.gz: 18c93604f417f0daa0dd284acf44b7223f31168683a46afa8d016e4d909db6ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74fb1594c6a4d0bbef8d915837375297dab00d44fada360126b93eef47933bbc14ae1bd9144d1d8307c21793161a6d04f14ff9e9eb6788cf5e365d9663583ff6
|
7
|
+
data.tar.gz: e1edfcd8b94510b9bf3a16f840dd3708fb6cf9db1f7f22979754597f609e54c7e77f83acbaab6b0650b81336087bdd87dd676afe4db09c9bcfad5e6c8db53f81
|
@@ -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.3pre1
|
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: 1.3.1
|
515
515
|
requirements: []
|
516
516
|
rubygems_version: 3.2.22
|
517
517
|
signing_key:
|