metanorma-cli 1.4.17 → 1.4.18pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +35 -0
- data/docs/installation.adoc +154 -23
- data/docs/usage.adoc +16 -20
- data/lib/metanorma/cli/version.rb +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: 8eb864d5612a326a357c52312047e5d12023b80e3005d766d54778aa5f5cd5aa
|
4
|
+
data.tar.gz: c3c856e48c5277c6d7e624cc48c0a2907a2093b836424a1d2eebff97e7daab0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37b4a2ecb0b582d28d0330dc0c3011fda684806aaa8b2bb7685a00540c40dba7f76708aea75d1706bdf58738e46f8cf1a73138fcaad38e83966f73dc70e4b2ad
|
7
|
+
data.tar.gz: 7c37e6be7c420fe45f70fdcd3028d2595cc11145dea5a82c1035fdb09a4c07789c42add84db5821436a3dfffdecd4aa59d94587a234cf7c756af717fd6079c34
|
data/README.adoc
CHANGED
@@ -69,6 +69,41 @@ option.
|
|
69
69
|
metanorma setup --agree-to-terms
|
70
70
|
----
|
71
71
|
|
72
|
+
=== External dependencies
|
73
|
+
|
74
|
+
The Metanorma toolchain supports certain features when optional dependencies
|
75
|
+
are installed. Please refer to the following table for them.
|
76
|
+
|
77
|
+
[cols="1,1,1"]
|
78
|
+
|===
|
79
|
+
|Dependency |Mandatory? | Target component / purpose
|
80
|
+
|
81
|
+
|https://git-scm.com/[`git`]
|
82
|
+
| :white_check_mark:
|
83
|
+
|`metarnoma-cli` (templates), https://github.com/fontist/fontist[`fontist`]
|
84
|
+
|
85
|
+
|https://www.oracle.com/java/technologies/[`java`]
|
86
|
+
| :white_check_mark:
|
87
|
+
|https://github.com/metanorma/mn2pdf[`mn2pdf`], https://github.com/metanorma/metanorma-standoc[`metanorma-standoc`]
|
88
|
+
|
89
|
+
|https://xml2rfc.tools.ietf.org/[`xml2rfc`] (`python`)
|
90
|
+
| :white_large_square:
|
91
|
+
|https://github.com/metanorma/metanorma-ietf[`metanorma-ietf`]
|
92
|
+
|
93
|
+
|https://inkscape.org/[`inkscape`]
|
94
|
+
| :white_large_square:
|
95
|
+
|https://github.com/metanorma/isodoc[`isodoc`], SVG to EMF functionality (for inserting SVGs into Word)
|
96
|
+
|
97
|
+
|https://graphviz.org/[`graphviz`]
|
98
|
+
| :white_check_mark:
|
99
|
+
|https://github.com/lutaml/lutaml[`lutaml`] generation of LutaML diagrams
|
100
|
+
|
101
|
+
|http://www.plantuml.com/[`plantuml`]
|
102
|
+
| :white_large_square:
|
103
|
+
|https://github.com/metanorma/metanorma-standoc[`metanorma-standoc`] generation of PlantUML diagrams
|
104
|
+
|
105
|
+
|===
|
106
|
+
|
72
107
|
|
73
108
|
=== Generate a new Metanorma document using a template (`metanorma new`)
|
74
109
|
|
data/docs/installation.adoc
CHANGED
@@ -1,21 +1,89 @@
|
|
1
1
|
= Installation
|
2
2
|
|
3
|
-
|
3
|
+
The `metanorma` command-line executable is installed by this Ruby gem.
|
4
4
|
|
5
5
|
[IMPORTANT]
|
6
6
|
====
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
Users of the Metanorma suite should install Metanorma according to the steps at
|
8
|
+
the
|
9
|
+
https://www.metanorma.org/author/topics/install/[Metanorma installation guide].
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
Which exactly depends on what documents you’re building, below notes cover some of that.
|
11
|
+
The instructions provided here are intended for Metanorma developers, since
|
12
|
+
a number of third-party dependencies will also need to be installed manually.
|
14
13
|
====
|
15
14
|
|
16
15
|
|
16
|
+
== Install Ruby
|
17
|
+
|
18
|
+
== macOS
|
19
|
+
|
20
|
+
While macOS provides a default installation of Ruby, it is restricted in a
|
21
|
+
number of ways.
|
22
|
+
|
23
|
+
We strongly recommend installing a Ruby outside of the system Ruby using
|
24
|
+
`rbenv`.
|
25
|
+
|
26
|
+
[source,console]
|
27
|
+
----
|
28
|
+
# Install Xcode and associated development tools
|
29
|
+
$ xcode-select --install
|
30
|
+
|
31
|
+
# Install GCC and development tools
|
32
|
+
$ brew install autoconf gcc make
|
33
|
+
|
34
|
+
# Install rbenv to manage Ruby versions
|
35
|
+
# Remember to follow the setup steps by running `rbenv init`!
|
36
|
+
$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
|
37
|
+
|
38
|
+
# Install Ruby 2.7.4 through rbenv
|
39
|
+
$ rbenv install 2.7.4
|
40
|
+
|
41
|
+
# Set Ruby 2.7.4 as your global version
|
42
|
+
$ rbenv global 2.7.4
|
43
|
+
|
44
|
+
# Then restart Terminal.app
|
45
|
+
----
|
46
|
+
|
47
|
+
|
48
|
+
== Linux
|
49
|
+
|
50
|
+
Ruby may not be pre-installed on your Linux distribution.
|
51
|
+
|
52
|
+
Please follow the official
|
53
|
+
https://www.ruby-lang.org/en/documentation/installation[Ruby installation guide].
|
54
|
+
|
55
|
+
== Windows
|
56
|
+
|
57
|
+
Ruby is not pre-installed on Windows.
|
58
|
+
|
59
|
+
The easiest way to install Ruby is with `RubyInstaller`, as recommended by
|
60
|
+
the official
|
61
|
+
https://www.ruby-lang.org/en/documentation/installation[Ruby installation guide])
|
62
|
+
|
63
|
+
If you prefer an automated way to install, we recommend using
|
64
|
+
https://chocolatey.org/install[Chocolatey] with commands below:
|
65
|
+
|
66
|
+
[source,console]
|
67
|
+
----
|
68
|
+
choco install -y msys2 ruby
|
69
|
+
refreshenv
|
70
|
+
ridk install 3
|
71
|
+
----
|
72
|
+
|
73
|
+
Those commands will work with both PowerShell and CMD.exe.
|
74
|
+
|
75
|
+
|
76
|
+
== Other
|
77
|
+
|
78
|
+
Further details (or FAQ) on Ruby installation please visit the official
|
79
|
+
https://www.ruby-lang.org/en/documentation/installation[Ruby installation guide].
|
80
|
+
|
81
|
+
|
82
|
+
|
17
83
|
== Installing the Metanorma CLI gem
|
18
84
|
|
85
|
+
Once Ruby is installed, you can install `metanorma-cli` as a gem:
|
86
|
+
|
19
87
|
[source,console]
|
20
88
|
----
|
21
89
|
gem install metanorma-cli
|
@@ -29,33 +97,96 @@ Installing the gem will also install all officially supported Metanorma flavors
|
|
29
97
|
|
30
98
|
=== Java
|
31
99
|
|
32
|
-
You will have to have a Java runtime installed.
|
100
|
+
You will have to have a Java runtime installed.
|
33
101
|
|
34
|
-
|
102
|
+
Use the following commands on various platforms:
|
35
103
|
|
36
|
-
|
37
|
-
you will also need to install the https://github.com/GoogleChrome/puppeteer[Puppeteer] Node library.
|
104
|
+
macOS:: Run `brew cask install java`
|
38
105
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
* Ensure you have NPM: https://docs.npmjs.com/getting-started/installing-node
|
43
|
-
* Install Puppeteer globally in your system: `npm install -g --save --save-exact puppeteer`
|
106
|
+
Linux:: Follow https://www.java.com/en/download/help/linux_install.html[official instructions]
|
107
|
+
|
108
|
+
Windows:: Run `choco install -y javaruntime`
|
44
109
|
|
45
110
|
=== PlantUML
|
46
111
|
|
47
112
|
*If your documents include link:/author/topics/document-format/diagrams/[PlantUML diagrams]*,
|
48
113
|
PlantUML will have to be installed.
|
49
114
|
|
50
|
-
|
51
|
-
|
115
|
+
macOS:: Run `brew install plantuml`.
|
116
|
+
|
117
|
+
Linux:: Link the PlantUML jar file into a command line executable; see
|
52
118
|
`.travis.yml` for an example.
|
53
119
|
|
54
|
-
|
55
|
-
|
120
|
+
Windows:: Run `choco install -y plantuml`.
|
121
|
+
|
122
|
+
If PlantUML diagrams used within a document but there PlantUML is not installed,
|
123
|
+
the PlantUML diagram source will be incorporated into the output document as
|
124
|
+
source code (i.e. `[source]` style).
|
125
|
+
|
126
|
+
=== Graphviz
|
127
|
+
|
128
|
+
Graphviz is required by LutaML (and PlantUML) to draw diagrams.
|
129
|
+
|
130
|
+
macOS:: Run `brew install graphviz`.
|
131
|
+
|
132
|
+
Linux:: Install the appropriate
|
133
|
+
https://graphviz.org/download/#linux[available packages] (`apt` or `yum`)
|
134
|
+
|
135
|
+
Windows:: Run `choco install -y graphviz`
|
136
|
+
|
137
|
+
|
138
|
+
=== xml2rfc
|
139
|
+
|
140
|
+
Metanorma IETF requires usage of the `xml2rfc` Python package.
|
141
|
+
|
142
|
+
To install Python:
|
143
|
+
|
144
|
+
macOS:: `brew install python3`
|
145
|
+
|
146
|
+
Windows:: `choco install -y python`
|
147
|
+
|
148
|
+
Then install `xml2rfc` with:
|
149
|
+
|
150
|
+
[source,console]
|
151
|
+
----
|
152
|
+
pip3 install xml2rfc
|
153
|
+
----
|
154
|
+
|
155
|
+
|
156
|
+
=== Inkscape
|
157
|
+
|
158
|
+
Optional dependency. Inkscape is needed for SVG-to-EMF conversion functionality.
|
159
|
+
|
160
|
+
macOS:: Run `brew install inkscape`
|
161
|
+
|
162
|
+
Linux:: See Linux instructions https://inkscape.org/release/[here]
|
163
|
+
|
164
|
+
Windows:: Run `choco install -y inkscape`
|
165
|
+
|
166
|
+
|
167
|
+
=== LaTeXML
|
168
|
+
|
169
|
+
Optional dependency. `LaTeXML` is needed for Metanorma for LaTeX functionality.
|
170
|
+
|
171
|
+
Most of the packages from various package manager listed on
|
172
|
+
https://dlmf.nist.gov/LaTeXML/get.html are outdated.
|
173
|
+
|
174
|
+
Since `LaTeXML` is a `perl` module, a reliable way to install it is with the
|
175
|
+
https://metacpan.org/dist/App-cpanminus/view/bin/cpanm[`cpanm` package manager]
|
176
|
+
|
177
|
+
[source,console]
|
178
|
+
----
|
179
|
+
curl -L https://cpanmin.us | perl - --sudo App::cpanminus
|
180
|
+
cpanm --notest LaTeXML
|
181
|
+
# or
|
182
|
+
cpanm --notest git://github.com/brucemiller/LaTeXML.git@9a0e7dc5
|
183
|
+
----
|
184
|
+
|
185
|
+
Alternative, it also can be installed in the following ways (always check the
|
186
|
+
version, because the packages may be outdated):
|
56
187
|
|
188
|
+
macOS:: Run `brew install latexml`
|
57
189
|
|
58
|
-
|
190
|
+
Linux (with Snap installed):: Run `snap install latexml`
|
59
191
|
|
60
|
-
|
61
|
-
If you are installing metanorma with chocolatey installation script will do this for you
|
192
|
+
Windows:: `choco install -y latexml`
|
data/docs/usage.adoc
CHANGED
@@ -51,24 +51,20 @@ $ metanorma -t mpfd -r metanorma-mpfd mpfd-bpn.adoc
|
|
51
51
|
|
52
52
|
[source,sh]
|
53
53
|
----
|
54
|
-
$ metanorma
|
55
|
-
|
56
|
-
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
-f, --format FORMAT Format of source file: asciidoc (current default, only format supported)
|
71
|
-
-r, --require LIBRARY Require LIBRARY prior to execution
|
72
|
-
-w, --wrapper Create wrapper folder for HTML output
|
73
|
-
-h, --help Show this message
|
54
|
+
$ metanorma help
|
55
|
+
Commands:
|
56
|
+
metanorma collection FILENAME -w, --output-folder=OUTPUT_FOLDER # Render HTML pages from XML/YAML colection
|
57
|
+
metanorma compile FILENAME # Compile to a metanorma document
|
58
|
+
metanorma config # Manage configuration file
|
59
|
+
metanorma help [COMMAND] # Describe available commands or one specific command
|
60
|
+
metanorma list-doctypes # List supported doctypes
|
61
|
+
metanorma list-extensions # List supported extensions
|
62
|
+
metanorma new NAME -d, --doctype=DOCTYPE -t, --type=TYPE # Create new Metanorma document
|
63
|
+
metanorma site # Manage site for metanorma collections
|
64
|
+
metanorma template-repo # Manage metanorma templates repository
|
65
|
+
metanorma version # Version of the code
|
66
|
+
|
67
|
+
Options:
|
68
|
+
-s, [--no-progress], [--no-no-progress] # Don't show progress for long running tasks (like download)
|
69
|
+
# Default: true
|
74
70
|
----
|
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.4.
|
4
|
+
version: 1.4.18pre
|
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
|
+
date: 2021-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -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.1.4
|
517
517
|
signing_key:
|