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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19cdaa5531c4a21f960513604360707a782f27093e357d6fa9ead35ffe9a6c58
4
- data.tar.gz: 33e76af5a167f23c2ac47b269bbfb24cb5565ee455445c515907eb74700ba1c9
3
+ metadata.gz: 8eb864d5612a326a357c52312047e5d12023b80e3005d766d54778aa5f5cd5aa
4
+ data.tar.gz: c3c856e48c5277c6d7e624cc48c0a2907a2093b836424a1d2eebff97e7daab0e
5
5
  SHA512:
6
- metadata.gz: a6a884a92db47bb9f9eb7362da88f886f95bece627749b768c8f6fb4ab94dbb214c483497f2e54a62c13397ccb1b77ddf31e6f28633a05bca176f3409d76fa37
7
- data.tar.gz: 74bbe7ed3a1030fb167bae108095ea737bca3b54bcb87e82fbeaa7ddd67d69d007687a5d3c1afa04be6a1ce66fc5d03c03741a4a2fd4ddd5fabdb08b8e01dcbe
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
 
@@ -1,21 +1,89 @@
1
1
  = Installation
2
2
 
3
- You can get the `metanorma` command-line executable by installing this Ruby gem.
3
+ The `metanorma` command-line executable is installed by this Ruby gem.
4
4
 
5
5
  [IMPORTANT]
6
6
  ====
7
- To install the Metanorma toolchain we recommend to use one of the ways described in
8
- https://www.metanorma.com/author/topics/install/[Metanorma installation] topic.
9
- Installing this gem by hand may not be the easiest way.
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
- When following this installation method, to start building documents you may have to take care
12
- of manually installing some required third-party software as well.
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. (Use `brew cask install java` on macOS.)
100
+ You will have to have a Java runtime installed.
33
101
 
34
- === Puppeteer
102
+ Use the following commands on various platforms:
35
103
 
36
- *If you are going to generate PDFs from HTML* (which applies to CalConnect Standard Documents),
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
- * Ensure you have Node of at least version 7.6.0:
40
- ** https://nodejs.org/en/download/
41
- ** On macOS you should be able to `brew install node`
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
- * `brew install plantuml` on MacOS.
51
- * For Linux, link the PlantUML jar file into a command line executable; see
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
- If PlantUML is not installed locally, the source PlantUML is incorporated into
55
- the output document as sourcecode.
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
- == Installation notes for Windows
190
+ Linux (with Snap installed):: Run `snap install latexml`
59
191
 
60
- To be able to compile gem with a native extension you must have `RIDK` installed.
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 -h
55
- Usage: metanorma [options] <file>
56
- -t, --type TYPE Type of standard to generate: rfc2, rfc3, iso, gb, csd, csand, m3d
57
- -x, --extensions EXT1,EXT2,... | all Type of extension to generate per type:
58
- {
59
- :rfc2=>{:xmlrfc=>"v2.xml"},
60
- :rfc3=>{:xmlrfc=>"v3.xml"},
61
- :iso=>{:html=>"html", :html_alt=>"alt.html", :doc=>"doc"},
62
- :gb=>{:html=>"html", :doc=>"doc"},
63
- :csd=>{:html=>"html", :pdf=>"pdf"},
64
- :csand=>{:html=>"html"},
65
- :m3d=>{:html=>"html", :doc=>"doc"},
66
- :rsd=>{:html=>"html"}
67
- }
68
- In addition, xml (outside of rfc2, rfc3) generates IsoDoc XML. If the argument is "all" or the option is
69
- missing, all available extensions are generated.
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
  ----
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cli
3
- VERSION = "1.4.17".freeze
3
+ VERSION = "1.4.18pre".freeze
4
4
  end
5
5
  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.4.17
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-09-27 00:00:00.000000000 Z
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: '0'
514
+ version: 1.3.1
515
515
  requirements: []
516
516
  rubygems_version: 3.1.4
517
517
  signing_key: