metanorma-cli 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/exe/metanorma +14 -1
- data/lib/metanorma-cli/version.rb +1 -1
- data/metanorma-cli.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90c858bc93e81710dc43eb24db299fa904c44d83cb8dc730d64a0aab4b77e1fc
|
4
|
+
data.tar.gz: df422215603206c9bb1d1ea54deb1eab7bc80022f9d837af65904a48b6e15d8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 961c8c87d11e4e0d76cab2bd554968667a4d994d1d0043336cd392ee9e287ed2645e353dc597ea1fe289ef6652f2aaa2edb1fd10e2573a3caef631b3b4bd0709
|
7
|
+
data.tar.gz: e163041d83221671afb73b2fb377d608c0f0923b044965bbe65fef66cffed1ef93e7640fd2eb3891a3e7a5a7b1451ba7df0b35de2a2d27c0b4c1b934bd2bb179
|
data/Gemfile
CHANGED
data/exe/metanorma
CHANGED
@@ -101,11 +101,13 @@ end
|
|
101
101
|
|
102
102
|
opt_parser.parse!(ARGV)
|
103
103
|
|
104
|
+
=begin
|
104
105
|
if options[:require]
|
105
106
|
options[:require].each do |r|
|
106
107
|
require r
|
107
108
|
end
|
108
109
|
end
|
110
|
+
=end
|
109
111
|
|
110
112
|
if options[:version]
|
111
113
|
case options[:format]
|
@@ -124,6 +126,8 @@ unless options[:filename]
|
|
124
126
|
end
|
125
127
|
|
126
128
|
filename = options[:filename]
|
129
|
+
|
130
|
+
=begin
|
127
131
|
options[:type] ||= registry&.find_processor(:iso)&.extract_metanorma_options(File.read(filename, encoding: "utf-8"))[:type]&.to_sym
|
128
132
|
standard_type = options[:type]
|
129
133
|
unless standard_type
|
@@ -131,7 +135,9 @@ unless standard_type
|
|
131
135
|
puts opt_parser.help
|
132
136
|
exit 0
|
133
137
|
end
|
138
|
+
=end
|
134
139
|
|
140
|
+
=begin
|
135
141
|
unless registry.supported_backends.include? standard_type
|
136
142
|
puts "[metanorma] Warning: #{standard_type} is not a default standard type."
|
137
143
|
puts "[metanorma] Info: Attempting to load `metanorma-#{standard_type}` gem for standard type `#{standard_type}`."
|
@@ -149,16 +155,22 @@ unless registry.supported_backends.include? standard_type
|
|
149
155
|
exit 0
|
150
156
|
end
|
151
157
|
end
|
158
|
+
=end
|
152
159
|
|
160
|
+
=begin
|
153
161
|
unless options[:format] == :asciidoc
|
154
162
|
puts "[metanorma] Error: Only source file format currently supported is 'asciidoc'."
|
155
163
|
exit 0
|
156
164
|
end
|
165
|
+
=end
|
157
166
|
|
167
|
+
=begin
|
158
168
|
options[:extension_keys] ||= registry&.find_processor(:iso)&.
|
159
169
|
extract_metanorma_options(File.read(filename, encoding: "utf-8"))[:extensions]&.split(/,[ ]*/)&.map(&:to_sym)
|
160
170
|
options[:extension_keys] = nil if options[:extension_keys] == [:all]
|
171
|
+
=end
|
161
172
|
|
173
|
+
=begin
|
162
174
|
case options[:format]
|
163
175
|
when :asciidoc
|
164
176
|
processor = registry.find_processor(options[:type].to_sym)
|
@@ -195,7 +207,6 @@ when :asciidoc
|
|
195
207
|
if options[:relaton]
|
196
208
|
xml = Nokogiri::XML(isodoc)
|
197
209
|
bibdata = xml.at("//bibdata") || xml.at("//xmlns:bibdata")
|
198
|
-
# require "byebug"; byebug
|
199
210
|
#docid = bibdata&.at("./xmlns:docidentifier")&.text || options[:filename]
|
200
211
|
#outname = docid.sub(/^\s+/, "").sub(/\s+$/, "").gsub(/\s+/, "-") + ".xml"
|
201
212
|
File.open(options[:relaton], "w:UTF-8") { |f| f.write bibdata.to_xml }
|
@@ -218,4 +229,6 @@ else
|
|
218
229
|
warn "[metanorma] Error: output format (#{options[:format]}) not supported."
|
219
230
|
exit 1
|
220
231
|
end
|
232
|
+
=end
|
221
233
|
|
234
|
+
Metanorma::Compile.new().compile(filename, options)
|
data/metanorma-cli.gemspec
CHANGED
@@ -45,6 +45,6 @@ Gem::Specification.new do |spec|
|
|
45
45
|
spec.add_runtime_dependency 'metanorma-mpfd', "~> 0.1.0"
|
46
46
|
spec.add_runtime_dependency 'metanorma-unece', "~> 0.0.1"
|
47
47
|
spec.add_runtime_dependency 'isodoc', "~> 0.9.0"
|
48
|
-
spec.add_runtime_dependency 'metanorma', "~> 0.3.
|
48
|
+
spec.add_runtime_dependency 'metanorma', "~> 0.3.5"
|
49
49
|
spec.add_runtime_dependency 'nokogiri'
|
50
50
|
end
|
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.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -282,14 +282,14 @@ dependencies:
|
|
282
282
|
requirements:
|
283
283
|
- - "~>"
|
284
284
|
- !ruby/object:Gem::Version
|
285
|
-
version: 0.3.
|
285
|
+
version: 0.3.5
|
286
286
|
type: :runtime
|
287
287
|
prerelease: false
|
288
288
|
version_requirements: !ruby/object:Gem::Requirement
|
289
289
|
requirements:
|
290
290
|
- - "~>"
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version: 0.3.
|
292
|
+
version: 0.3.5
|
293
293
|
- !ruby/object:Gem::Dependency
|
294
294
|
name: nokogiri
|
295
295
|
requirement: !ruby/object:Gem::Requirement
|