metanorma-cli 1.5.1pre → 1.5.3pre

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: 10cc309ff314ca31ff04136b7b9e2a981d781fd60896ccc66761ee8dc06cfb45
4
- data.tar.gz: a9d4cebc65c9262a26be6e560ffd9b63e52ae28b7b341cf60ddd476c7cc272e9
3
+ metadata.gz: 3654dab46e0671529ddac65f53672c22bcf28c141b7943284ba22f1c3fc786ea
4
+ data.tar.gz: ac3404efcf0665e90de22b9bb0844562804c9c8c7a34ee07aec7b9410f18afbc
5
5
  SHA512:
6
- metadata.gz: e7bd2b661690fff1255bb8de6986d1285427a4197d50aca722c5ae09a8a716c6226f67ad6714fbd04f9d35dfa518faaf89caafb3e3b8307fecc03e8a7c1d2f6a
7
- data.tar.gz: 2126cb2901a0aafc877e532cdf8d499a571b43981e83a220e783622fac450368d1b2a793b417d6ad3ef9290b71a08bcc5b1eec4cfeefa74b01b7759bf405abb5
6
+ metadata.gz: dad7b0fe9be0799ca2ab663dd9040ea2404e8491f6cb8800a7f43e9dc0a36c0cd9cc9222cd462f9602b5669af3db9e27eab664fe8e2aa8ef4bb0b2b3cf3631ab
7
+ data.tar.gz: 85cf0afb0d66526efbb388fa40c5ef46d4ab9f48ed4e98544228f4caf02a525d600641e66f05c6b4ac3c9da80d15bd01f2d1811eb8d94fc96f8dcd7087091347
@@ -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"
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cli
3
- VERSION = "1.5.1pre".freeze
3
+ VERSION = "1.5.3pre".freeze
4
4
  end
5
5
  end
@@ -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 "byebug", "~> 10.0"
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.1pre
4
+ version: 1.5.3pre
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-04 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: byebug
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