metanorma-cli 1.1.8 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +102 -112
- data/README.adoc +188 -7
- data/a +1 -1
- data/appveyor.yml +3 -2
- data/b +85 -0
- data/lib/metanorma/cli.rb +2 -2
- data/lib/metanorma/cli/command.rb +36 -6
- data/lib/metanorma/cli/compiler.rb +7 -2
- data/lib/metanorma/cli/version.rb +1 -1
- data/metanorma-cli.gemspec +14 -15
- data/templates/base/Makefile +18 -2
- data/templates/base/Makefile.win +66 -13
- data/test.rxl +16 -15
- data/tmp/my-custom-csd/Makefile.win +66 -13
- data/tmp/my-document/Makefile.win +66 -13
- data/tmp/my-local-document/Makefile.win +66 -13
- metadata +26 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 257a0c33f07f9b412bf11de5c0dfeea4025dc05ec54ec3c69aea9b1eb205df35
|
4
|
+
data.tar.gz: bb4c121dd0d9d142097138da52a054f1a65321d7953bc0eeba0e71c8f122ba2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74866f346a2651bb295d881b42a846f66508cd6db1c2b33b5c2705ee4be11f963f06f611ed3b2c17ddd6428091b25d0fdf2baf264d66cc7428bcaf9946cb4276
|
7
|
+
data.tar.gz: 2152501a0b8e242f98f29ce0d08f961146efc95945b51fee4523684fc3bacc915fceef21426ba764466aece1e58f5ab05906ef9d69de2c43aeb000f452e7756f
|
data/Gemfile.lock
CHANGED
@@ -1,23 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
metanorma-cli (1.
|
4
|
+
metanorma-cli (1.2.0)
|
5
5
|
git (~> 1.5)
|
6
|
-
isodoc (~> 0.
|
6
|
+
isodoc (~> 0.10.0)
|
7
7
|
metanorma (~> 0.3.9)
|
8
|
-
metanorma-acme (~> 1.
|
9
|
-
metanorma-csand (~> 1.
|
10
|
-
metanorma-csd (~> 1.
|
11
|
-
metanorma-gb (~> 1.
|
8
|
+
metanorma-acme (~> 1.2.0)
|
9
|
+
metanorma-csand (~> 1.2.0)
|
10
|
+
metanorma-csd (~> 1.2.0)
|
11
|
+
metanorma-gb (~> 1.2.0)
|
12
12
|
metanorma-ietf (~> 1.0.1)
|
13
|
-
metanorma-iso (~> 1.
|
14
|
-
metanorma-m3d (~> 1.
|
15
|
-
metanorma-
|
16
|
-
metanorma-
|
17
|
-
metanorma-
|
18
|
-
metanorma-
|
19
|
-
metanorma-standoc (~> 1.1.0)
|
20
|
-
metanorma-unece (~> 0.0.1)
|
13
|
+
metanorma-iso (~> 1.2.0)
|
14
|
+
metanorma-m3d (~> 1.2.0)
|
15
|
+
metanorma-nist (~> 0.1.0)
|
16
|
+
metanorma-ogc (~> 0.1.0)
|
17
|
+
metanorma-standoc (~> 1.2.0)
|
18
|
+
metanorma-unece (~> 0.1.0)
|
21
19
|
nokogiri (>= 1)
|
22
20
|
thor (~> 0.20.3)
|
23
21
|
|
@@ -39,14 +37,10 @@ GEM
|
|
39
37
|
diff-lcs (1.3)
|
40
38
|
equivalent-xml (0.6.0)
|
41
39
|
nokogiri (>= 1.4.3)
|
42
|
-
ffi (1.
|
40
|
+
ffi (1.11.1)
|
43
41
|
gb-agencies (0.0.5)
|
44
|
-
gbbib (0.4.4)
|
45
|
-
cnccs (~> 0.1.1)
|
46
|
-
gb-agencies (~> 0.0.1)
|
47
|
-
iso-bib-item (~> 0.4.2)
|
48
42
|
git (1.5.0)
|
49
|
-
html2doc (0.8.
|
43
|
+
html2doc (0.8.11)
|
50
44
|
asciimath (~> 1.0.7)
|
51
45
|
htmlentities (~> 4.3.4)
|
52
46
|
image_size
|
@@ -56,132 +50,108 @@ GEM
|
|
56
50
|
uuidtools
|
57
51
|
htmlentities (4.3.4)
|
58
52
|
httpclient (2.8.3)
|
59
|
-
iecbib (0.2.2)
|
60
|
-
addressable
|
61
|
-
iso-bib-item (~> 0.4.2)
|
62
|
-
ietfbib (0.4.6)
|
63
|
-
iso-bib-item (~> 0.4.2)
|
64
53
|
iev (0.2.2)
|
65
54
|
nokogiri
|
66
|
-
image_size (2.0.
|
55
|
+
image_size (2.0.1)
|
67
56
|
iso-639 (0.2.8)
|
68
|
-
|
69
|
-
isoics (~> 0.1.6)
|
70
|
-
nokogiri (~> 1.8.4)
|
71
|
-
ruby_deep_clone (~> 0.8.0)
|
72
|
-
isobib (0.4.4)
|
73
|
-
algoliasearch
|
74
|
-
iecbib (~> 0.2.1)
|
75
|
-
iso-bib-item (~> 0.4.2)
|
76
|
-
isodoc (0.9.23)
|
57
|
+
isodoc (0.10.0)
|
77
58
|
asciimath
|
78
|
-
html2doc (~> 0.8.
|
59
|
+
html2doc (~> 0.8.11)
|
79
60
|
htmlentities (~> 4.3.4)
|
80
61
|
liquid
|
81
62
|
metanorma (~> 0.3.0)
|
82
63
|
nokogiri (>= 1)
|
83
64
|
rake (~> 12.0)
|
84
65
|
roman-numerals
|
85
|
-
sassc (~>
|
66
|
+
sassc (~> 2)
|
86
67
|
thread_safe
|
87
68
|
uuidtools
|
88
69
|
isoics (0.1.7)
|
89
70
|
json (2.2.0)
|
90
71
|
liquid (4.0.3)
|
91
|
-
metanorma (0.3.
|
72
|
+
metanorma (0.3.12)
|
92
73
|
asciidoctor
|
93
74
|
htmlentities
|
94
|
-
metanorma-acme (1.
|
75
|
+
metanorma-acme (1.2.0)
|
95
76
|
asciidoctor (~> 1.5.7)
|
96
77
|
htmlentities (~> 4.3.4)
|
97
|
-
isodoc (~> 0.
|
98
|
-
metanorma-standoc (~> 1.
|
78
|
+
isodoc (~> 0.10.0)
|
79
|
+
metanorma-standoc (~> 1.2.0)
|
99
80
|
ruby-jing
|
100
|
-
metanorma-csand (1.
|
81
|
+
metanorma-csand (1.2.0)
|
101
82
|
asciidoctor (~> 1.5.7)
|
102
83
|
asciimath
|
103
84
|
htmlentities (~> 4.3.4)
|
104
85
|
image_size
|
105
|
-
isodoc (~> 0.
|
106
|
-
metanorma-standoc (~> 1.
|
86
|
+
isodoc (~> 0.10.0)
|
87
|
+
metanorma-standoc (~> 1.2.0)
|
107
88
|
mime-types
|
108
89
|
nokogiri
|
109
90
|
ruby-jing
|
110
91
|
thread_safe
|
111
92
|
uuidtools
|
112
|
-
metanorma-csd (1.
|
113
|
-
isodoc (~> 0.
|
114
|
-
metanorma-standoc (~> 1.
|
115
|
-
metanorma-gb (1.
|
93
|
+
metanorma-csd (1.2.0)
|
94
|
+
isodoc (~> 0.10.0)
|
95
|
+
metanorma-standoc (~> 1.2.0)
|
96
|
+
metanorma-gb (1.2.0)
|
116
97
|
gb-agencies (~> 0.0.4)
|
117
98
|
htmlentities (~> 4.3.4)
|
118
|
-
isodoc (~> 0.
|
119
|
-
metanorma-iso (~> 1.
|
99
|
+
isodoc (~> 0.10.0)
|
100
|
+
metanorma-iso (~> 1.2.0)
|
120
101
|
twitter_cldr (~> 4.4.4)
|
121
|
-
metanorma-ietf (1.0.
|
122
|
-
isodoc (~> 0.
|
123
|
-
metanorma-standoc (~> 1.
|
124
|
-
metanorma-iso (1.
|
102
|
+
metanorma-ietf (1.0.3)
|
103
|
+
isodoc (~> 0.10.0)
|
104
|
+
metanorma-standoc (~> 1.2.0)
|
105
|
+
metanorma-iso (1.2.0)
|
125
106
|
asciidoctor (~> 1.5.7)
|
126
|
-
|
127
|
-
|
128
|
-
metanorma-standoc (~> 1.1.0)
|
107
|
+
isodoc (~> 0.10.0)
|
108
|
+
metanorma-standoc (~> 1.2.0)
|
129
109
|
ruby-jing
|
130
|
-
metanorma-m3d (1.
|
110
|
+
metanorma-m3d (1.2.0)
|
131
111
|
asciidoctor (~> 1.5.7)
|
132
112
|
asciimath
|
133
113
|
htmlentities (~> 4.3.4)
|
134
114
|
image_size
|
135
|
-
isodoc (~> 0.
|
136
|
-
metanorma-standoc (~> 1.
|
115
|
+
isodoc (~> 0.10.0)
|
116
|
+
metanorma-standoc (~> 1.2.0)
|
137
117
|
mime-types
|
138
118
|
nokogiri
|
139
119
|
ruby-jing
|
140
120
|
thread_safe
|
141
121
|
uuidtools
|
142
|
-
metanorma-
|
143
|
-
asciidoctor (~> 1.5.7)
|
144
|
-
htmlentities (~> 4.3.4)
|
145
|
-
isodoc (~> 0.9.0)
|
146
|
-
metanorma-standoc (~> 1.1.0)
|
147
|
-
nokogiri
|
148
|
-
twitter_cldr
|
149
|
-
metanorma-nist (0.0.8)
|
122
|
+
metanorma-nist (0.1.0)
|
150
123
|
asciidoctor (~> 1.5.7)
|
151
124
|
htmlentities (~> 4.3.4)
|
152
|
-
isodoc (~> 0.
|
153
|
-
metanorma-standoc (~> 1.
|
125
|
+
isodoc (~> 0.10.0)
|
126
|
+
metanorma-standoc (~> 1.2.0)
|
127
|
+
relaton-nist (~> 0.2.0)
|
154
128
|
ruby-jing
|
155
129
|
twitter_cldr
|
156
|
-
|
130
|
+
tzinfo-data
|
131
|
+
metanorma-ogc (0.1.0)
|
157
132
|
asciidoctor (~> 1.5.7)
|
158
133
|
htmlentities (~> 4.3.4)
|
159
134
|
iso-639
|
160
|
-
isodoc (~> 0.
|
161
|
-
metanorma-standoc (~> 1.
|
135
|
+
isodoc (~> 0.10.0)
|
136
|
+
metanorma-standoc (~> 1.2.0)
|
162
137
|
ruby-jing
|
163
|
-
metanorma-
|
164
|
-
asciidoctor (~> 1.5.7)
|
165
|
-
htmlentities (~> 4.3.4)
|
166
|
-
isodoc (~> 0.9.0)
|
167
|
-
metanorma-standoc (~> 1.1.0)
|
168
|
-
nokogiri
|
169
|
-
metanorma-standoc (1.1.9)
|
138
|
+
metanorma-standoc (1.2.0)
|
170
139
|
asciidoctor (~> 1.5.7)
|
171
140
|
concurrent-ruby
|
172
|
-
html2doc (~> 0.8.
|
141
|
+
html2doc (~> 0.8.11)
|
173
142
|
iev (~> 0.2.1)
|
174
|
-
isodoc (~> 0.
|
175
|
-
relaton (~> 0.
|
143
|
+
isodoc (~> 0.10.0)
|
144
|
+
relaton (~> 0.4.0)
|
145
|
+
relaton-cli (~> 0.2.0)
|
176
146
|
ruby-jing
|
177
147
|
sterile (~> 1.0.14)
|
178
148
|
unicode2latex (~> 0.0.1)
|
179
|
-
metanorma-unece (0.0
|
149
|
+
metanorma-unece (0.1.0)
|
180
150
|
asciidoctor (~> 1.5.7)
|
181
151
|
htmlentities (~> 4.3.4)
|
182
152
|
iso-639
|
183
|
-
isodoc (~> 0.
|
184
|
-
metanorma-standoc (~> 1.
|
153
|
+
isodoc (~> 0.10.0)
|
154
|
+
metanorma-standoc (~> 1.2.0)
|
185
155
|
roman-numerals
|
186
156
|
ruby-jing
|
187
157
|
twitter_cldr
|
@@ -190,26 +160,49 @@ GEM
|
|
190
160
|
mime-types-data (3.2019.0331)
|
191
161
|
mini_portile2 (2.3.0)
|
192
162
|
mixlib-shellout (2.4.4)
|
193
|
-
nistbib (0.1.5)
|
194
|
-
relaton-bib (~> 0.1.0)
|
195
163
|
nokogiri (1.8.5)
|
196
164
|
mini_portile2 (~> 2.3.0)
|
197
165
|
optout (0.0.2)
|
198
|
-
public_suffix (3.0
|
166
|
+
public_suffix (3.1.0)
|
199
167
|
rake (12.3.2)
|
200
|
-
|
201
|
-
rb-inotify (0.10.0)
|
202
|
-
ffi (~> 1.0)
|
203
|
-
relaton (0.3.4)
|
168
|
+
relaton (0.4.0)
|
204
169
|
algoliasearch
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
iso
|
209
|
-
|
210
|
-
|
211
|
-
|
170
|
+
relaton-gb (~> 0.5.0)
|
171
|
+
relaton-iec (~> 0.3.0)
|
172
|
+
relaton-ietf (~> 0.5.0)
|
173
|
+
relaton-iso (~> 0.5.0)
|
174
|
+
relaton-iso-bib (~> 0.2.0)
|
175
|
+
relaton-itu (~> 0.2.0)
|
176
|
+
relaton-nist (~> 0.2.0)
|
177
|
+
relaton-bib (0.2.1)
|
178
|
+
addressable
|
212
179
|
nokogiri (~> 1.8.4)
|
180
|
+
relaton-cli (0.2.0)
|
181
|
+
liquid
|
182
|
+
relaton (~> 0.4)
|
183
|
+
thor
|
184
|
+
relaton-gb (0.5.0)
|
185
|
+
cnccs (~> 0.1.1)
|
186
|
+
gb-agencies (~> 0.0.1)
|
187
|
+
relaton-iso-bib (~> 0.2.0)
|
188
|
+
relaton-iec (0.3.0)
|
189
|
+
addressable
|
190
|
+
relaton-iso-bib (~> 0.2.0)
|
191
|
+
relaton-ietf (0.5.0)
|
192
|
+
relaton-iso-bib (~> 0.2.0)
|
193
|
+
relaton-iso (0.5.0)
|
194
|
+
algoliasearch
|
195
|
+
relaton-iec (~> 0.3.0)
|
196
|
+
relaton-iso-bib (~> 0.2.0)
|
197
|
+
relaton-iso-bib (0.2.2)
|
198
|
+
isoics (~> 0.1.6)
|
199
|
+
nokogiri (~> 1.8.4)
|
200
|
+
relaton-bib (~> 0.2.0)
|
201
|
+
ruby_deep_clone (~> 0.8.0)
|
202
|
+
relaton-itu (0.2.0)
|
203
|
+
relaton-iso-bib (~> 0.2.0)
|
204
|
+
relaton-nist (0.2.0)
|
205
|
+
relaton-bib (~> 0.2.0)
|
213
206
|
roman-numerals (0.3.0)
|
214
207
|
rspec (3.8.0)
|
215
208
|
rspec-core (~> 3.8.0)
|
@@ -219,29 +212,24 @@ GEM
|
|
219
212
|
mixlib-shellout (~> 2.0)
|
220
213
|
rspec (~> 3.2)
|
221
214
|
rspec-its (~> 1.2)
|
222
|
-
rspec-core (3.8.
|
215
|
+
rspec-core (3.8.1)
|
223
216
|
rspec-support (~> 3.8.0)
|
224
|
-
rspec-expectations (3.8.
|
217
|
+
rspec-expectations (3.8.4)
|
225
218
|
diff-lcs (>= 1.2.0, < 2.0)
|
226
219
|
rspec-support (~> 3.8.0)
|
227
220
|
rspec-its (1.3.0)
|
228
221
|
rspec-core (>= 3.0.0)
|
229
222
|
rspec-expectations (>= 3.0.0)
|
230
|
-
rspec-mocks (3.8.
|
223
|
+
rspec-mocks (3.8.1)
|
231
224
|
diff-lcs (>= 1.2.0, < 2.0)
|
232
225
|
rspec-support (~> 3.8.0)
|
233
|
-
rspec-support (3.8.
|
226
|
+
rspec-support (3.8.2)
|
234
227
|
ruby-jing (0.0.1)
|
235
228
|
optout (>= 0.0.2)
|
236
229
|
ruby_deep_clone (0.8.0)
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
241
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
242
|
-
sassc (1.12.1)
|
243
|
-
ffi (~> 1.9.6)
|
244
|
-
sass (>= 3.3.0)
|
230
|
+
sassc (2.0.1)
|
231
|
+
ffi (~> 1.9)
|
232
|
+
rake
|
245
233
|
sterile (1.0.14)
|
246
234
|
nokogiri
|
247
235
|
thor (0.20.3)
|
@@ -252,6 +240,8 @@ GEM
|
|
252
240
|
tzinfo
|
253
241
|
tzinfo (2.0.0)
|
254
242
|
concurrent-ruby (~> 1.0)
|
243
|
+
tzinfo-data (1.2019.1)
|
244
|
+
tzinfo (>= 1.0.0)
|
255
245
|
unicode2latex (0.0.2)
|
256
246
|
uuidtools (2.1.5)
|
257
247
|
|
data/README.adoc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= Metanorma
|
1
|
+
= Metanorma command-line interface (CLI)
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/metanorma-cli.svg["Gem Version", link="https://rubygems.org/gems/metanorma-cli"]
|
4
4
|
image:https://img.shields.io/travis/metanorma/metanorma-cli/master.svg["Build Status", link="https://travis-ci.org/metanorma/metanorma-cli"]
|
@@ -14,11 +14,192 @@ Depending on your setup, you may find quicker ways to get started:
|
|
14
14
|
please refer to https://www.metanorma.com/docs/getting-started/[Getting Started] instead.
|
15
15
|
====
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
To install this gem, simply run:
|
18
|
+
|
19
|
+
[source,sh]
|
20
|
+
----
|
21
|
+
gem install metanorma-cli
|
22
|
+
----
|
23
|
+
|
24
|
+
This will install the `metanorma` executable, which you can use with all
|
19
25
|
officially supported Metanorma flavors (such as ISO, CalConnect, IETF, etc).
|
20
|
-
However, certain dependencies such as Puppeteer may have to be installed separately,
|
21
|
-
and the process is a little more complex if you’re using Windows.
|
22
26
|
|
23
|
-
|
24
|
-
|
27
|
+
However, a number of dependencies (such as Puppeteer and LaTeXML) are not
|
28
|
+
installed with this gem, and have to be installed separately.
|
29
|
+
The process of installing the full suite can be a little more complex.
|
30
|
+
|
31
|
+
Generally, we recommend you to follow steps given at
|
32
|
+
https://www.metanorma.com/author/topics/install/[Metanorma Installation].
|
33
|
+
|
34
|
+
But if you aren't afraid of tinkering deeply, please see the
|
35
|
+
link:docs/installation.adoc[Developer Installation Notes]
|
36
|
+
for advanced details regarding dependencies and Windows installation notes.
|
37
|
+
|
38
|
+
|
39
|
+
== Usage
|
40
|
+
|
41
|
+
=== Generate a new Metanorma document using a template (`metanorma new`)
|
42
|
+
|
43
|
+
Metanorma CLI allows you to create a new document using an official
|
44
|
+
template, or a user-specified custom template.
|
45
|
+
|
46
|
+
To see what options are available under the `new` command,
|
47
|
+
run `metanorma help new`.
|
48
|
+
|
49
|
+
==== Generate a new document from an official Metanorma template (from an official Metanorma template repository)
|
50
|
+
|
51
|
+
The `metanorma new` command allows you to create a document by running a
|
52
|
+
single command.
|
53
|
+
|
54
|
+
To create a new document using an official template you simply
|
55
|
+
invoke the command with the mandatory options `type` and `doctype`,
|
56
|
+
then Metanorma will find and load the official template to
|
57
|
+
create your document.
|
58
|
+
|
59
|
+
For example, if you want to create a new CSD document (`type`: `csd`) called
|
60
|
+
`csd-foo-standard`, using the `standard` template type,
|
61
|
+
run the following command:
|
62
|
+
|
63
|
+
[source, sh]
|
64
|
+
----
|
65
|
+
metanorma new -d standard -t csd csd-foo-standard
|
66
|
+
----
|
67
|
+
|
68
|
+
This will create your barebones document and will also print out
|
69
|
+
all files created during generation.
|
70
|
+
|
71
|
+
Currently, the supported Metanorma template types are `csd`, `ogc` and `iso`.
|
72
|
+
|
73
|
+
|
74
|
+
==== Generate a new document from a custom Metanorma template repository
|
75
|
+
|
76
|
+
The CLI allows using custom or unofficial template repositories, meaning you
|
77
|
+
could also generate a new document using your own custom template.
|
78
|
+
|
79
|
+
Metanorma supports two types of template repositories:
|
80
|
+
|
81
|
+
* Git: a Git repository (local or remote, public or private)
|
82
|
+
* Local: a directory
|
83
|
+
|
84
|
+
Once a template repository and a template within is specified, Metanorma will
|
85
|
+
automatically download and generate the new document using your custom template.
|
86
|
+
|
87
|
+
For example, if you want to create a new CSD document with the
|
88
|
+
following parameters:
|
89
|
+
|
90
|
+
* Document name: `my-custom-csd-document`
|
91
|
+
* Flavor: `csd`
|
92
|
+
* Doctype: `standard`
|
93
|
+
* Template: `https://gitfoo.com/foobar/mn-templates-foobar` (fictitious example)
|
94
|
+
|
95
|
+
You could execute the following command to do so:
|
96
|
+
|
97
|
+
[source,sh]
|
98
|
+
----
|
99
|
+
metanorma new -d standard -t csd \
|
100
|
+
-l https://gitfoo.com/foobar/mn-templates-foobar my-custom-csd-document
|
101
|
+
----
|
102
|
+
|
103
|
+
Here's an example of using a local directory:
|
104
|
+
|
105
|
+
[source,sh]
|
106
|
+
----
|
107
|
+
metanorma new -d standard -t csd \
|
108
|
+
-l ~/shared/mn-templates my-custom-csd-document
|
109
|
+
----
|
110
|
+
|
111
|
+
|
112
|
+
=== Compile a document (`metanorma compile` or just `metanorma`)
|
113
|
+
|
114
|
+
The key functionality of this CLI is to allow compilation of a Metanorma document.
|
115
|
+
The command `metanorma help compile` will display all usage instructions of
|
116
|
+
the `compile` command shown with available options.
|
117
|
+
|
118
|
+
[source]
|
119
|
+
----
|
120
|
+
Usage:
|
121
|
+
metanorma compile FILENAME [..options]
|
122
|
+
|
123
|
+
Options:
|
124
|
+
-t, [--type=TYPE] # Type of standard to generate
|
125
|
+
-x, [--extensions=EXTENSIONS] # Type of extension to generate per type
|
126
|
+
-f, [--format=FORMAT] # Format of source file: eg. asciidoc
|
127
|
+
# Default: asciidoc
|
128
|
+
|
129
|
+
-r, [--require=one two three] # Require LIBRARY prior to execution
|
130
|
+
-w, [--wrapper], [--no-wrapper] # Create wrapper folder for HTML output
|
131
|
+
-a, [--asciimath], [--no-asciimath] # Keep Asciimath in XML output instead of converting it to MathM
|
132
|
+
-R, [--relaton=RELATON] # Export Relaton XML for document to nominated filename
|
133
|
+
-e, [--extract=EXTRACT] # Export sourcecode fragments from this document to nominated directory
|
134
|
+
-v, [--version=VERSION] # Print version of code (accompanied with -t)
|
135
|
+
----
|
136
|
+
|
137
|
+
So, let's put this in use. For example we have a document `my-iso-document.adoc`
|
138
|
+
and we want to compile this using `iso` and `html` as extension, then we can use
|
139
|
+
the following command.
|
140
|
+
|
141
|
+
[source, sh]
|
142
|
+
----
|
143
|
+
metanorma compile --type iso -x html my-iso-document.adoc
|
144
|
+
# or just
|
145
|
+
metanorma --type iso -x html my-iso-document.adoc
|
146
|
+
----
|
147
|
+
|
148
|
+
This should compile any valid document, but if there are some issues then it
|
149
|
+
will also print those out in the terminal. Currently, the supported flavors
|
150
|
+
are `ietf`, `iso`, `gb`, `csd`, `csand`, `m3d` and `rsd`.
|
151
|
+
|
152
|
+
|
153
|
+
=== List supported output formats (`metanorma list-extensions`)
|
154
|
+
|
155
|
+
Need to know what output formats are supported for a given flavor?
|
156
|
+
We've got you covered.
|
157
|
+
|
158
|
+
To list out the output formats supported by every single flavor type,
|
159
|
+
run the following command:
|
160
|
+
|
161
|
+
[source,sh]
|
162
|
+
|
163
|
+
----
|
164
|
+
metanorma list-extensions
|
165
|
+
----
|
166
|
+
|
167
|
+
|
168
|
+
To list out the output formats supported by a particular flavor type,
|
169
|
+
run the following command:
|
170
|
+
|
171
|
+
[source,sh]
|
172
|
+
----
|
173
|
+
metanorma list-extensions <flavor>
|
174
|
+
----
|
175
|
+
|
176
|
+
e.g.,
|
177
|
+
|
178
|
+
[source,sh]
|
179
|
+
----
|
180
|
+
metanorma list-extensions iso
|
181
|
+
----
|
182
|
+
|
183
|
+
|
184
|
+
=== Show processor version (`metanorma version`)
|
185
|
+
|
186
|
+
The `version` command returns the version of the Metanorma processor for
|
187
|
+
a specific flavor.
|
188
|
+
|
189
|
+
e.g., to know the currently running version for `iso`, then we
|
190
|
+
can use the following command and this will show the current version that we are
|
191
|
+
using for that specific processor.
|
192
|
+
|
193
|
+
[source, sh]
|
194
|
+
----
|
195
|
+
metanorma version --type iso
|
196
|
+
----
|
197
|
+
|
198
|
+
|
199
|
+
== Credits
|
200
|
+
|
201
|
+
This gem is developed, maintained and funded by https://www.metanorma.com/docs/getting-started/[Ribose Inc.]
|
202
|
+
|
203
|
+
== License
|
204
|
+
|
205
|
+
The gem is available under the terms of the http://opensource.org/licenses/MIT[MIT License].
|