metanorma-cli 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +37 -35
- data/a +1 -1
- data/lib/metanorma/cli.rb +1 -1
- data/lib/metanorma/cli/compiler.rb +18 -4
- data/lib/metanorma/cli/generator.rb +7 -5
- data/lib/metanorma/cli/git_template.rb +1 -0
- data/lib/metanorma/cli/version.rb +1 -1
- data/templates/base/.travis.yml +12 -3
- data/templates/base/Makefile +22 -11
- data/templates/base/metanorma.yml +4 -0
- data/tmp/my-custom-csd/Makefile +22 -11
- data/tmp/my-custom-csd/metanorma.yml +4 -0
- data/tmp/my-document/Makefile +22 -11
- data/tmp/my-document/metanorma.yml +4 -0
- data/tmp/my-local-document/Makefile +22 -11
- data/tmp/my-local-document/metanorma.yml +4 -0
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cab45f94fc1b2282d269aa9ef1a450cf89aaf23bb9ace390670c0a627dcd172c
|
|
4
|
+
data.tar.gz: df422a51593aba002c82a8bf4234340ace9dd0954d8578b37e8a4e566e898746
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b8a551a0ca1b0ee1a014211ef1357c72506cc4e462203183187289acc6fd37cd0c91db53b18f1be9813cd96af8b9b601f70ee143f98a4158cef5b3bfdb40f93
|
|
7
|
+
data.tar.gz: 0b3765b60deb378a917f026e9e552d658702fb3e7371c99343bbfe41ec37e25cf07ab21130adae687f67d8ec0e54fb8eb7fe7a03367b5172c0577a3cd0d17ac4
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
metanorma-cli (1.2.
|
|
4
|
+
metanorma-cli (1.2.7)
|
|
5
5
|
git (~> 1.5)
|
|
6
6
|
isodoc (~> 1.0.0)
|
|
7
7
|
metanorma (~> 0.3.9)
|
|
@@ -30,7 +30,7 @@ GEM
|
|
|
30
30
|
byebug (10.0.2)
|
|
31
31
|
camertron-eprun (1.1.1)
|
|
32
32
|
cldr-plurals-runtime-rb (1.0.1)
|
|
33
|
-
cnccs (0.1.
|
|
33
|
+
cnccs (0.1.4)
|
|
34
34
|
concurrent-ruby (1.1.5)
|
|
35
35
|
diff-lcs (1.3)
|
|
36
36
|
equivalent-xml (0.6.0)
|
|
@@ -38,22 +38,22 @@ GEM
|
|
|
38
38
|
faraday (0.15.4)
|
|
39
39
|
multipart-post (>= 1.2, < 3)
|
|
40
40
|
ffi (1.11.1)
|
|
41
|
-
gb-agencies (0.0.
|
|
41
|
+
gb-agencies (0.0.6)
|
|
42
42
|
git (1.5.0)
|
|
43
|
-
html2doc (0.8.
|
|
43
|
+
html2doc (0.8.13)
|
|
44
44
|
asciimath (~> 1.0.7)
|
|
45
45
|
htmlentities (~> 4.3.4)
|
|
46
46
|
image_size
|
|
47
47
|
mime-types
|
|
48
|
-
nokogiri
|
|
48
|
+
nokogiri (>= 1.10.4)
|
|
49
49
|
thread_safe
|
|
50
50
|
uuidtools
|
|
51
51
|
htmlentities (4.3.4)
|
|
52
|
-
iev (0.2.
|
|
53
|
-
nokogiri
|
|
52
|
+
iev (0.2.3)
|
|
53
|
+
nokogiri (>= 1.10.4)
|
|
54
54
|
image_size (2.0.2)
|
|
55
55
|
iso-639 (0.2.8)
|
|
56
|
-
isodoc (1.0.
|
|
56
|
+
isodoc (1.0.3)
|
|
57
57
|
asciimath
|
|
58
58
|
html2doc (~> 0.8.11)
|
|
59
59
|
htmlentities (~> 4.3.4)
|
|
@@ -65,18 +65,18 @@ GEM
|
|
|
65
65
|
sassc (~> 2)
|
|
66
66
|
thread_safe
|
|
67
67
|
uuidtools
|
|
68
|
-
isoics (0.1.
|
|
68
|
+
isoics (0.1.8)
|
|
69
69
|
liquid (4.0.3)
|
|
70
|
-
metanorma (0.3.
|
|
70
|
+
metanorma (0.3.15)
|
|
71
71
|
asciidoctor
|
|
72
72
|
htmlentities
|
|
73
|
-
metanorma-acme (1.3.
|
|
73
|
+
metanorma-acme (1.3.2)
|
|
74
74
|
asciidoctor (~> 1.5.7)
|
|
75
75
|
htmlentities (~> 4.3.4)
|
|
76
76
|
isodoc (~> 1.0.0)
|
|
77
77
|
metanorma-standoc (~> 1.3.0)
|
|
78
78
|
ruby-jing
|
|
79
|
-
metanorma-csand (1.3.
|
|
79
|
+
metanorma-csand (1.3.2)
|
|
80
80
|
asciidoctor (~> 1.5.7)
|
|
81
81
|
asciimath
|
|
82
82
|
htmlentities (~> 4.3.4)
|
|
@@ -87,16 +87,16 @@ GEM
|
|
|
87
87
|
ruby-jing
|
|
88
88
|
thread_safe
|
|
89
89
|
uuidtools
|
|
90
|
-
metanorma-csd (1.3.
|
|
90
|
+
metanorma-csd (1.3.2)
|
|
91
91
|
isodoc (~> 1.0.0)
|
|
92
92
|
metanorma-standoc (~> 1.3.0)
|
|
93
|
-
metanorma-gb (1.3.
|
|
93
|
+
metanorma-gb (1.3.3)
|
|
94
94
|
gb-agencies (~> 0.0.4)
|
|
95
95
|
htmlentities (~> 4.3.4)
|
|
96
96
|
isodoc (~> 1.0.0)
|
|
97
97
|
metanorma-iso (~> 1.3.0)
|
|
98
98
|
twitter_cldr (~> 4.4.4)
|
|
99
|
-
metanorma-iec (0.0.
|
|
99
|
+
metanorma-iec (0.0.6)
|
|
100
100
|
asciidoctor (~> 1.5.7)
|
|
101
101
|
isodoc (~> 1.0.0)
|
|
102
102
|
metanorma-iso (~> 1.3.0)
|
|
@@ -104,18 +104,18 @@ GEM
|
|
|
104
104
|
metanorma-ietf (1.0.6)
|
|
105
105
|
isodoc (~> 1.0.0)
|
|
106
106
|
metanorma-standoc (~> 1.3.0)
|
|
107
|
-
metanorma-iso (1.3.
|
|
107
|
+
metanorma-iso (1.3.3)
|
|
108
108
|
asciidoctor (~> 1.5.7)
|
|
109
109
|
isodoc (~> 1.0.0)
|
|
110
110
|
metanorma-standoc (~> 1.3.0)
|
|
111
111
|
ruby-jing
|
|
112
|
-
metanorma-itu (0.2.
|
|
112
|
+
metanorma-itu (0.2.5)
|
|
113
113
|
asciidoctor (~> 1.5.7)
|
|
114
114
|
htmlentities (~> 4.3.4)
|
|
115
115
|
isodoc (~> 1.0.0)
|
|
116
116
|
metanorma-standoc (~> 1.3.0)
|
|
117
117
|
ruby-jing
|
|
118
|
-
metanorma-m3d (1.3.
|
|
118
|
+
metanorma-m3d (1.3.2)
|
|
119
119
|
asciidoctor (~> 1.5.7)
|
|
120
120
|
asciimath
|
|
121
121
|
htmlentities (~> 4.3.4)
|
|
@@ -126,7 +126,7 @@ GEM
|
|
|
126
126
|
ruby-jing
|
|
127
127
|
thread_safe
|
|
128
128
|
uuidtools
|
|
129
|
-
metanorma-nist (0.2.
|
|
129
|
+
metanorma-nist (0.2.3)
|
|
130
130
|
asciidoctor (~> 1.5.7)
|
|
131
131
|
htmlentities (~> 4.3.4)
|
|
132
132
|
isodoc (~> 1.0.0)
|
|
@@ -134,25 +134,26 @@ GEM
|
|
|
134
134
|
ruby-jing
|
|
135
135
|
twitter_cldr
|
|
136
136
|
tzinfo-data
|
|
137
|
-
metanorma-ogc (0.2.
|
|
137
|
+
metanorma-ogc (0.2.3)
|
|
138
138
|
asciidoctor (~> 1.5.7)
|
|
139
139
|
htmlentities (~> 4.3.4)
|
|
140
140
|
iso-639
|
|
141
141
|
isodoc (~> 1.0.0)
|
|
142
142
|
metanorma-standoc (~> 1.3.0)
|
|
143
143
|
ruby-jing
|
|
144
|
-
metanorma-standoc (1.3.
|
|
144
|
+
metanorma-standoc (1.3.3)
|
|
145
145
|
asciidoctor (~> 1.5.7)
|
|
146
146
|
concurrent-ruby
|
|
147
147
|
html2doc (~> 0.8.11)
|
|
148
148
|
iev (~> 0.2.1)
|
|
149
149
|
isodoc (~> 1.0.0)
|
|
150
|
+
mimemagic
|
|
150
151
|
relaton (~> 0.5.0)
|
|
151
152
|
relaton-iev (~> 0.1.0)
|
|
152
153
|
ruby-jing
|
|
153
154
|
sterile (~> 1.0.14)
|
|
154
155
|
unicode2latex (~> 0.0.1)
|
|
155
|
-
metanorma-unece (0.2.
|
|
156
|
+
metanorma-unece (0.2.3)
|
|
156
157
|
asciidoctor (~> 1.5.7)
|
|
157
158
|
htmlentities (~> 4.3.4)
|
|
158
159
|
iso-639
|
|
@@ -164,6 +165,7 @@ GEM
|
|
|
164
165
|
mime-types (3.3)
|
|
165
166
|
mime-types-data (~> 3.2015)
|
|
166
167
|
mime-types-data (3.2019.0904)
|
|
168
|
+
mimemagic (0.3.3)
|
|
167
169
|
mini_portile2 (2.4.0)
|
|
168
170
|
mixlib-shellout (2.4.4)
|
|
169
171
|
multipart-post (2.1.1)
|
|
@@ -172,7 +174,7 @@ GEM
|
|
|
172
174
|
optout (0.0.2)
|
|
173
175
|
public_suffix (4.0.1)
|
|
174
176
|
rake (12.3.3)
|
|
175
|
-
relaton (0.5.
|
|
177
|
+
relaton (0.5.5)
|
|
176
178
|
relaton-gb (~> 0.6.0)
|
|
177
179
|
relaton-iec (~> 0.4.0)
|
|
178
180
|
relaton-ietf (~> 0.6.0)
|
|
@@ -180,33 +182,33 @@ GEM
|
|
|
180
182
|
relaton-itu (~> 0.3.0)
|
|
181
183
|
relaton-nist (~> 0.3.0)
|
|
182
184
|
relaton-ogc (~> 0.1.0)
|
|
183
|
-
relaton-bib (0.3.
|
|
185
|
+
relaton-bib (0.3.8)
|
|
184
186
|
addressable
|
|
185
187
|
nokogiri
|
|
186
|
-
relaton-gb (0.6.
|
|
188
|
+
relaton-gb (0.6.4)
|
|
187
189
|
cnccs (~> 0.1.1)
|
|
188
190
|
gb-agencies (~> 0.0.1)
|
|
189
191
|
relaton-iso-bib (~> 0.3.0)
|
|
190
|
-
relaton-iec (0.4.
|
|
192
|
+
relaton-iec (0.4.6)
|
|
191
193
|
addressable
|
|
192
194
|
relaton-iso-bib (~> 0.3.0)
|
|
193
|
-
relaton-ietf (0.6.
|
|
195
|
+
relaton-ietf (0.6.5)
|
|
194
196
|
relaton-bib (~> 0.3.0)
|
|
195
197
|
relaton-iev (0.1.1)
|
|
196
198
|
relaton (~> 0.5.0)
|
|
197
|
-
relaton-iso (0.6.
|
|
199
|
+
relaton-iso (0.6.6)
|
|
198
200
|
relaton-iec (~> 0.4.0)
|
|
199
201
|
relaton-iso-bib (~> 0.3.0)
|
|
200
|
-
relaton-iso-bib (0.3.
|
|
202
|
+
relaton-iso-bib (0.3.7)
|
|
201
203
|
isoics (~> 0.1.6)
|
|
202
204
|
relaton-bib (~> 0.3.0)
|
|
203
205
|
ruby_deep_clone (~> 0.8.0)
|
|
204
|
-
relaton-itu (0.3.
|
|
206
|
+
relaton-itu (0.3.4)
|
|
205
207
|
relaton-iso-bib (~> 0.3.0)
|
|
206
|
-
relaton-nist (0.3.
|
|
208
|
+
relaton-nist (0.3.5)
|
|
207
209
|
relaton-bib (~> 0.3.0)
|
|
208
210
|
rubyzip
|
|
209
|
-
relaton-ogc (0.1.
|
|
211
|
+
relaton-ogc (0.1.1)
|
|
210
212
|
faraday
|
|
211
213
|
relaton-iso-bib (~> 0.3.0)
|
|
212
214
|
roman-numerals (0.3.0)
|
|
@@ -233,8 +235,8 @@ GEM
|
|
|
233
235
|
ruby-jing (0.0.1)
|
|
234
236
|
optout (>= 0.0.2)
|
|
235
237
|
ruby_deep_clone (0.8.0)
|
|
236
|
-
rubyzip (
|
|
237
|
-
sassc (2.2.
|
|
238
|
+
rubyzip (2.0.0)
|
|
239
|
+
sassc (2.2.1)
|
|
238
240
|
ffi (~> 1.9)
|
|
239
241
|
sterile (1.0.14)
|
|
240
242
|
nokogiri
|
|
@@ -248,7 +250,7 @@ GEM
|
|
|
248
250
|
concurrent-ruby (~> 1.0)
|
|
249
251
|
tzinfo-data (1.2019.3)
|
|
250
252
|
tzinfo (>= 1.0.0)
|
|
251
|
-
unicode2latex (0.0.
|
|
253
|
+
unicode2latex (0.0.3)
|
|
252
254
|
uuidtools (2.1.5)
|
|
253
255
|
|
|
254
256
|
PLATFORMS
|
data/a
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
git add lib/metanorma/cli/version.rb metanorma-cli.gemspec
|
|
1
|
+
git add lib/metanorma/cli.rb lib/metanorma/cli/version.rb metanorma-cli.gemspec
|
data/lib/metanorma/cli.rb
CHANGED
|
@@ -60,7 +60,7 @@ module Metanorma
|
|
|
60
60
|
Metanorma::Cli::Command.start(arguments)
|
|
61
61
|
|
|
62
62
|
rescue Errors::FileNotFoundError => error
|
|
63
|
-
UI.say("Error: #{error}
|
|
63
|
+
UI.say("Error: #{error}. \nNot sure what to run? try: metanorma help")
|
|
64
64
|
exit(Errno::ENOENT::Errno)
|
|
65
65
|
end
|
|
66
66
|
|
|
@@ -1,22 +1,36 @@
|
|
|
1
|
+
require "pathname"
|
|
1
2
|
require "metanorma/cli/errors"
|
|
2
3
|
|
|
3
4
|
module Metanorma
|
|
4
5
|
module Cli
|
|
5
6
|
class Compiler
|
|
7
|
+
|
|
6
8
|
def initialize(file, options)
|
|
9
|
+
validate_file_path(file)
|
|
7
10
|
@file = file
|
|
8
11
|
@options = options
|
|
9
12
|
normalize_special_options
|
|
10
13
|
end
|
|
11
14
|
|
|
15
|
+
def validate_file_path(file)
|
|
16
|
+
path = Pathname.new(file)
|
|
17
|
+
# Check if provided file path exists
|
|
18
|
+
unless path.exist?
|
|
19
|
+
raise ::Metanorma::Cli::Errors::FileNotFoundError.new("Specified input file '#{file}' does not exist")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Check if provided file is really a file
|
|
23
|
+
unless path.file?
|
|
24
|
+
raise ::Metanorma::Cli::Errors::FileNotFoundError.new("Specified input file '#{file}' is not a file")
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
12
28
|
def compile
|
|
13
29
|
compile_file
|
|
14
30
|
end
|
|
15
31
|
|
|
16
32
|
def self.compile(file, options)
|
|
17
33
|
new(file, options).compile
|
|
18
|
-
rescue Errno::ENOENT
|
|
19
|
-
raise Errors::FileNotFoundError
|
|
20
34
|
end
|
|
21
35
|
|
|
22
36
|
private
|
|
@@ -24,7 +38,7 @@ module Metanorma
|
|
|
24
38
|
attr_reader :file, :options, :extract, :extensions
|
|
25
39
|
|
|
26
40
|
def compile_file
|
|
27
|
-
Compile.new.compile(
|
|
41
|
+
Compile.new.compile(file, serialize_options)
|
|
28
42
|
end
|
|
29
43
|
|
|
30
44
|
def serialize_options
|
|
@@ -57,7 +71,7 @@ module Metanorma
|
|
|
57
71
|
|
|
58
72
|
def normalize_special_options
|
|
59
73
|
@extract = (options.delete(:extract) || "").split(",")
|
|
60
|
-
@extensions = (options.delete(:extensions) || "").split(",")
|
|
74
|
+
@extensions = (options.delete(:extensions) || "").split(",")
|
|
61
75
|
options[:require] = [options[:require]] if options[:require]
|
|
62
76
|
end
|
|
63
77
|
end
|
|
@@ -58,8 +58,8 @@ module Metanorma
|
|
|
58
58
|
templates.each { |source, dest| create_file(source, dest) }
|
|
59
59
|
else
|
|
60
60
|
UI.say(
|
|
61
|
-
"
|
|
62
|
-
"
|
|
61
|
+
"Unable to generate document:\n" \
|
|
62
|
+
"Templates for type #{type.to_s} cannot be found -- please provide a valid `type` or a template URL"
|
|
63
63
|
)
|
|
64
64
|
end
|
|
65
65
|
end
|
|
@@ -135,9 +135,11 @@ module Metanorma
|
|
|
135
135
|
|
|
136
136
|
def permission_missing_error
|
|
137
137
|
UI.say(
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
138
|
+
"Unable to generate document:\n" \
|
|
139
|
+
"The current user does not have permission to write to this path:\n" \
|
|
140
|
+
"#{Cli.templates_path}\n" \
|
|
141
|
+
"Please ensure the path is writable by the current user, or\n" \
|
|
142
|
+
"run Metanorma using a different user with write permissions."
|
|
141
143
|
)
|
|
142
144
|
end
|
|
143
145
|
end
|
|
@@ -84,6 +84,7 @@ module Metanorma
|
|
|
84
84
|
csd: "https://github.com/metanorma/mn-templates-csd",
|
|
85
85
|
ogc: "https://github.com/metanorma/mn-templates-ogc",
|
|
86
86
|
iso: "https://github.com/metanorma/mn-templates-iso",
|
|
87
|
+
iec: "https://github.com/metanorma/mn-templates-iec",
|
|
87
88
|
ietf: "https://github.com/metanorma/mn-templates-ietf"
|
|
88
89
|
}
|
|
89
90
|
end
|
data/templates/base/.travis.yml
CHANGED
|
@@ -2,14 +2,23 @@ language: ruby
|
|
|
2
2
|
dist: xenial
|
|
3
3
|
env:
|
|
4
4
|
global:
|
|
5
|
-
-
|
|
6
|
-
|
|
5
|
+
- COMMIT_AUTHOR_EMAIL="$(yq r metanorma.yml metanorma.deploy.email)"
|
|
6
|
+
addons:
|
|
7
|
+
apt:
|
|
8
|
+
update: true
|
|
9
|
+
snaps:
|
|
10
|
+
- jq
|
|
11
|
+
- yq
|
|
12
|
+
- name: node
|
|
13
|
+
confinement: classic # or devmode
|
|
14
|
+
channel: 10/stable
|
|
7
15
|
rvm:
|
|
8
|
-
- 2.
|
|
16
|
+
- 2.6
|
|
9
17
|
cache: bundler
|
|
10
18
|
before_install:
|
|
11
19
|
- gem update --system
|
|
12
20
|
- gem install bundler
|
|
21
|
+
- npm install -g puppeteer
|
|
13
22
|
- sudo bash -c "curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/ubuntu.sh | bash"
|
|
14
23
|
script:
|
|
15
24
|
- make clean all publish
|
data/templates/base/Makefile
CHANGED
|
@@ -3,10 +3,14 @@ SHELL := /bin/bash
|
|
|
3
3
|
# Ensure the xml2rfc cache directory exists locally
|
|
4
4
|
IGNORE := $(shell mkdir -p $(HOME)/.cache/xml2rfc)
|
|
5
5
|
|
|
6
|
+
SRC := $(shell yq r metanorma.yml metanorma.source.files | cut -c 3-999)
|
|
7
|
+
ifeq ($(SRC),ll)
|
|
8
|
+
SRC := $(filter-out README.adoc, $(wildcard *.adoc))
|
|
9
|
+
endif
|
|
10
|
+
|
|
6
11
|
FORMAT_MARKER := mn-output-
|
|
7
|
-
FORMATS := $(shell grep "$(FORMAT_MARKER)"
|
|
12
|
+
FORMATS := $(shell grep "$(FORMAT_MARKER)" $(SRC) | cut -f 2 -d ' ' | tr ',' '\n' | sort | uniq | tr '\n' ' ')
|
|
8
13
|
|
|
9
|
-
SRC := $(filter-out README.adoc, $(wildcard *.adoc))
|
|
10
14
|
XML := $(patsubst %.adoc,%.xml,$(SRC))
|
|
11
15
|
XMLRFC3 := $(patsubst %.adoc,%.v3.xml,$(SRC))
|
|
12
16
|
HTML := $(patsubst %.adoc,%.html,$(SRC))
|
|
@@ -77,7 +81,7 @@ $(foreach FORMAT,$(FORMATS),$(eval $(FORMAT_TASKS)))
|
|
|
77
81
|
open: open-html
|
|
78
82
|
|
|
79
83
|
clean:
|
|
80
|
-
rm -f $(OUT_FILES)
|
|
84
|
+
rm -f $(OUT_FILES) && rm -rf published
|
|
81
85
|
|
|
82
86
|
bundle:
|
|
83
87
|
if [ "x" == "${METANORMA_DOCKER}x" ]; then bundle; fi
|
|
@@ -98,13 +102,13 @@ $(NODE_PACKAGE_PATHS): package.json
|
|
|
98
102
|
npm i
|
|
99
103
|
|
|
100
104
|
watch: $(NODE_BIN_DIR)/onchange
|
|
101
|
-
|
|
102
|
-
$< $(ALL_SRC) --
|
|
105
|
+
$(MAKE) all
|
|
106
|
+
$< $(ALL_SRC) -- $(MAKE) all
|
|
103
107
|
|
|
104
108
|
define WATCH_TASKS
|
|
105
109
|
watch-$(FORMAT): $(NODE_BIN_DIR)/onchange
|
|
106
|
-
|
|
107
|
-
$$< $$(SRC_$(FORMAT)) --
|
|
110
|
+
$(MAKE) $(FORMAT)
|
|
111
|
+
$$< $$(SRC_$(FORMAT)) -- $(MAKE) $(FORMAT)
|
|
108
112
|
|
|
109
113
|
.PHONY: watch-$(FORMAT)
|
|
110
114
|
endef
|
|
@@ -127,7 +131,14 @@ watch-serve: $(NODE_BIN_DIR)/run-p
|
|
|
127
131
|
#
|
|
128
132
|
|
|
129
133
|
publish:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
$(MAKE) published
|
|
135
|
+
|
|
136
|
+
published:
|
|
137
|
+
mkdir -p $@ && \
|
|
138
|
+
export GLOBIGNORE=$(SRC); \
|
|
139
|
+
cp -a $(addsuffix .*,$(basename $(SRC))) $@/; \
|
|
140
|
+
unset GLOBIGNORE; \
|
|
141
|
+
cp $(firstword $(HTML)) $@/index.html
|
|
142
|
+
|
|
143
|
+
.PHONY: publish
|
|
144
|
+
|
data/tmp/my-custom-csd/Makefile
CHANGED
|
@@ -3,10 +3,14 @@ SHELL := /bin/bash
|
|
|
3
3
|
# Ensure the xml2rfc cache directory exists locally
|
|
4
4
|
IGNORE := $(shell mkdir -p $(HOME)/.cache/xml2rfc)
|
|
5
5
|
|
|
6
|
+
SRC := $(shell yq r metanorma.yml metanorma.source.files | cut -c 3-999)
|
|
7
|
+
ifeq ($(SRC),ll)
|
|
8
|
+
SRC := $(filter-out README.adoc, $(wildcard *.adoc))
|
|
9
|
+
endif
|
|
10
|
+
|
|
6
11
|
FORMAT_MARKER := mn-output-
|
|
7
|
-
FORMATS := $(shell grep "$(FORMAT_MARKER)"
|
|
12
|
+
FORMATS := $(shell grep "$(FORMAT_MARKER)" $(SRC) | cut -f 2 -d ' ' | tr ',' '\n' | sort | uniq | tr '\n' ' ')
|
|
8
13
|
|
|
9
|
-
SRC := $(filter-out README.adoc, $(wildcard *.adoc))
|
|
10
14
|
XML := $(patsubst %.adoc,%.xml,$(SRC))
|
|
11
15
|
XMLRFC3 := $(patsubst %.adoc,%.v3.xml,$(SRC))
|
|
12
16
|
HTML := $(patsubst %.adoc,%.html,$(SRC))
|
|
@@ -77,7 +81,7 @@ $(foreach FORMAT,$(FORMATS),$(eval $(FORMAT_TASKS)))
|
|
|
77
81
|
open: open-html
|
|
78
82
|
|
|
79
83
|
clean:
|
|
80
|
-
rm -f $(OUT_FILES)
|
|
84
|
+
rm -f $(OUT_FILES) && rm -rf published
|
|
81
85
|
|
|
82
86
|
bundle:
|
|
83
87
|
if [ "x" == "${METANORMA_DOCKER}x" ]; then bundle; fi
|
|
@@ -98,13 +102,13 @@ $(NODE_PACKAGE_PATHS): package.json
|
|
|
98
102
|
npm i
|
|
99
103
|
|
|
100
104
|
watch: $(NODE_BIN_DIR)/onchange
|
|
101
|
-
|
|
102
|
-
$< $(ALL_SRC) --
|
|
105
|
+
$(MAKE) all
|
|
106
|
+
$< $(ALL_SRC) -- $(MAKE) all
|
|
103
107
|
|
|
104
108
|
define WATCH_TASKS
|
|
105
109
|
watch-$(FORMAT): $(NODE_BIN_DIR)/onchange
|
|
106
|
-
|
|
107
|
-
$$< $$(SRC_$(FORMAT)) --
|
|
110
|
+
$(MAKE) $(FORMAT)
|
|
111
|
+
$$< $$(SRC_$(FORMAT)) -- $(MAKE) $(FORMAT)
|
|
108
112
|
|
|
109
113
|
.PHONY: watch-$(FORMAT)
|
|
110
114
|
endef
|
|
@@ -127,7 +131,14 @@ watch-serve: $(NODE_BIN_DIR)/run-p
|
|
|
127
131
|
#
|
|
128
132
|
|
|
129
133
|
publish:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
$(MAKE) published
|
|
135
|
+
|
|
136
|
+
published:
|
|
137
|
+
mkdir -p $@ && \
|
|
138
|
+
export GLOBIGNORE=$(SRC); \
|
|
139
|
+
cp -a $(addsuffix .*,$(basename $(SRC))) $@/; \
|
|
140
|
+
unset GLOBIGNORE; \
|
|
141
|
+
cp $(firstword $(HTML)) $@/index.html
|
|
142
|
+
|
|
143
|
+
.PHONY: publish
|
|
144
|
+
|
data/tmp/my-document/Makefile
CHANGED
|
@@ -3,10 +3,14 @@ SHELL := /bin/bash
|
|
|
3
3
|
# Ensure the xml2rfc cache directory exists locally
|
|
4
4
|
IGNORE := $(shell mkdir -p $(HOME)/.cache/xml2rfc)
|
|
5
5
|
|
|
6
|
+
SRC := $(shell yq r metanorma.yml metanorma.source.files | cut -c 3-999)
|
|
7
|
+
ifeq ($(SRC),ll)
|
|
8
|
+
SRC := $(filter-out README.adoc, $(wildcard *.adoc))
|
|
9
|
+
endif
|
|
10
|
+
|
|
6
11
|
FORMAT_MARKER := mn-output-
|
|
7
|
-
FORMATS := $(shell grep "$(FORMAT_MARKER)"
|
|
12
|
+
FORMATS := $(shell grep "$(FORMAT_MARKER)" $(SRC) | cut -f 2 -d ' ' | tr ',' '\n' | sort | uniq | tr '\n' ' ')
|
|
8
13
|
|
|
9
|
-
SRC := $(filter-out README.adoc, $(wildcard *.adoc))
|
|
10
14
|
XML := $(patsubst %.adoc,%.xml,$(SRC))
|
|
11
15
|
XMLRFC3 := $(patsubst %.adoc,%.v3.xml,$(SRC))
|
|
12
16
|
HTML := $(patsubst %.adoc,%.html,$(SRC))
|
|
@@ -77,7 +81,7 @@ $(foreach FORMAT,$(FORMATS),$(eval $(FORMAT_TASKS)))
|
|
|
77
81
|
open: open-html
|
|
78
82
|
|
|
79
83
|
clean:
|
|
80
|
-
rm -f $(OUT_FILES)
|
|
84
|
+
rm -f $(OUT_FILES) && rm -rf published
|
|
81
85
|
|
|
82
86
|
bundle:
|
|
83
87
|
if [ "x" == "${METANORMA_DOCKER}x" ]; then bundle; fi
|
|
@@ -98,13 +102,13 @@ $(NODE_PACKAGE_PATHS): package.json
|
|
|
98
102
|
npm i
|
|
99
103
|
|
|
100
104
|
watch: $(NODE_BIN_DIR)/onchange
|
|
101
|
-
|
|
102
|
-
$< $(ALL_SRC) --
|
|
105
|
+
$(MAKE) all
|
|
106
|
+
$< $(ALL_SRC) -- $(MAKE) all
|
|
103
107
|
|
|
104
108
|
define WATCH_TASKS
|
|
105
109
|
watch-$(FORMAT): $(NODE_BIN_DIR)/onchange
|
|
106
|
-
|
|
107
|
-
$$< $$(SRC_$(FORMAT)) --
|
|
110
|
+
$(MAKE) $(FORMAT)
|
|
111
|
+
$$< $$(SRC_$(FORMAT)) -- $(MAKE) $(FORMAT)
|
|
108
112
|
|
|
109
113
|
.PHONY: watch-$(FORMAT)
|
|
110
114
|
endef
|
|
@@ -127,7 +131,14 @@ watch-serve: $(NODE_BIN_DIR)/run-p
|
|
|
127
131
|
#
|
|
128
132
|
|
|
129
133
|
publish:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
$(MAKE) published
|
|
135
|
+
|
|
136
|
+
published:
|
|
137
|
+
mkdir -p $@ && \
|
|
138
|
+
export GLOBIGNORE=$(SRC); \
|
|
139
|
+
cp -a $(addsuffix .*,$(basename $(SRC))) $@/; \
|
|
140
|
+
unset GLOBIGNORE; \
|
|
141
|
+
cp $(firstword $(HTML)) $@/index.html
|
|
142
|
+
|
|
143
|
+
.PHONY: publish
|
|
144
|
+
|
|
@@ -3,10 +3,14 @@ SHELL := /bin/bash
|
|
|
3
3
|
# Ensure the xml2rfc cache directory exists locally
|
|
4
4
|
IGNORE := $(shell mkdir -p $(HOME)/.cache/xml2rfc)
|
|
5
5
|
|
|
6
|
+
SRC := $(shell yq r metanorma.yml metanorma.source.files | cut -c 3-999)
|
|
7
|
+
ifeq ($(SRC),ll)
|
|
8
|
+
SRC := $(filter-out README.adoc, $(wildcard *.adoc))
|
|
9
|
+
endif
|
|
10
|
+
|
|
6
11
|
FORMAT_MARKER := mn-output-
|
|
7
|
-
FORMATS := $(shell grep "$(FORMAT_MARKER)"
|
|
12
|
+
FORMATS := $(shell grep "$(FORMAT_MARKER)" $(SRC) | cut -f 2 -d ' ' | tr ',' '\n' | sort | uniq | tr '\n' ' ')
|
|
8
13
|
|
|
9
|
-
SRC := $(filter-out README.adoc, $(wildcard *.adoc))
|
|
10
14
|
XML := $(patsubst %.adoc,%.xml,$(SRC))
|
|
11
15
|
XMLRFC3 := $(patsubst %.adoc,%.v3.xml,$(SRC))
|
|
12
16
|
HTML := $(patsubst %.adoc,%.html,$(SRC))
|
|
@@ -77,7 +81,7 @@ $(foreach FORMAT,$(FORMATS),$(eval $(FORMAT_TASKS)))
|
|
|
77
81
|
open: open-html
|
|
78
82
|
|
|
79
83
|
clean:
|
|
80
|
-
rm -f $(OUT_FILES)
|
|
84
|
+
rm -f $(OUT_FILES) && rm -rf published
|
|
81
85
|
|
|
82
86
|
bundle:
|
|
83
87
|
if [ "x" == "${METANORMA_DOCKER}x" ]; then bundle; fi
|
|
@@ -98,13 +102,13 @@ $(NODE_PACKAGE_PATHS): package.json
|
|
|
98
102
|
npm i
|
|
99
103
|
|
|
100
104
|
watch: $(NODE_BIN_DIR)/onchange
|
|
101
|
-
|
|
102
|
-
$< $(ALL_SRC) --
|
|
105
|
+
$(MAKE) all
|
|
106
|
+
$< $(ALL_SRC) -- $(MAKE) all
|
|
103
107
|
|
|
104
108
|
define WATCH_TASKS
|
|
105
109
|
watch-$(FORMAT): $(NODE_BIN_DIR)/onchange
|
|
106
|
-
|
|
107
|
-
$$< $$(SRC_$(FORMAT)) --
|
|
110
|
+
$(MAKE) $(FORMAT)
|
|
111
|
+
$$< $$(SRC_$(FORMAT)) -- $(MAKE) $(FORMAT)
|
|
108
112
|
|
|
109
113
|
.PHONY: watch-$(FORMAT)
|
|
110
114
|
endef
|
|
@@ -127,7 +131,14 @@ watch-serve: $(NODE_BIN_DIR)/run-p
|
|
|
127
131
|
#
|
|
128
132
|
|
|
129
133
|
publish:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
$(MAKE) published
|
|
135
|
+
|
|
136
|
+
published:
|
|
137
|
+
mkdir -p $@ && \
|
|
138
|
+
export GLOBIGNORE=$(SRC); \
|
|
139
|
+
cp -a $(addsuffix .*,$(basename $(SRC))) $@/; \
|
|
140
|
+
unset GLOBIGNORE; \
|
|
141
|
+
cp $(firstword $(HTML)) $@/index.html
|
|
142
|
+
|
|
143
|
+
.PHONY: publish
|
|
144
|
+
|
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.2.
|
|
4
|
+
version: 1.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-09-
|
|
11
|
+
date: 2019-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -402,19 +402,23 @@ files:
|
|
|
402
402
|
- templates/base/Makefile
|
|
403
403
|
- templates/base/Makefile.win
|
|
404
404
|
- templates/base/appveyor.yml
|
|
405
|
+
- templates/base/metanorma.yml
|
|
405
406
|
- test.rxl
|
|
406
407
|
- tmp/my-custom-csd/Gemfile
|
|
407
408
|
- tmp/my-custom-csd/Makefile
|
|
408
409
|
- tmp/my-custom-csd/Makefile.win
|
|
409
410
|
- tmp/my-custom-csd/appveyor.yml
|
|
411
|
+
- tmp/my-custom-csd/metanorma.yml
|
|
410
412
|
- tmp/my-document/Gemfile
|
|
411
413
|
- tmp/my-document/Makefile
|
|
412
414
|
- tmp/my-document/Makefile.win
|
|
413
415
|
- tmp/my-document/appveyor.yml
|
|
416
|
+
- tmp/my-document/metanorma.yml
|
|
414
417
|
- tmp/my-local-document/Gemfile
|
|
415
418
|
- tmp/my-local-document/Makefile
|
|
416
419
|
- tmp/my-local-document/Makefile.win
|
|
417
420
|
- tmp/my-local-document/appveyor.yml
|
|
421
|
+
- tmp/my-local-document/metanorma.yml
|
|
418
422
|
homepage: https://www.metanorma.com
|
|
419
423
|
licenses:
|
|
420
424
|
- BSD-2-Clause
|