metanorma-cli 1.0.10 → 1.1.0
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/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile.lock +253 -0
- data/a +1 -0
- data/a.rb +13 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/csd-tofix 2.zip +0 -0
- data/csd-tofix.zip +0 -0
- data/exe/metanorma +1 -11
- data/exe/metanorma-manifest +3 -12
- data/exe/metanorma.old +178 -0
- data/lib/metanorma-cli.rb +1 -21
- data/lib/metanorma/cli.rb +42 -0
- data/lib/metanorma/cli/version.rb +5 -0
- data/metanorma-cli.gemspec +6 -6
- metadata +15 -12
- data/.hound.yml +0 -3
- data/.rubocop.ribose.yml +0 -66
- data/.rubocop.tb.yml +0 -650
- data/.rubocop.yml +0 -10
- data/.travis.yml +0 -14
- data/docs/installation.adoc +0 -22
- data/docs/navigation.adoc +0 -9
- data/docs/usage.adoc +0 -74
- data/lib/metanorma-cli/version.rb +0 -5
data/.rubocop.yml
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
# This project follows the Ribose OSS style guide.
|
2
|
-
# https://github.com/riboseinc/oss-guides
|
3
|
-
# All project-specific additions and overrides should be specified in this file.
|
4
|
-
|
5
|
-
inherit_from:
|
6
|
-
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
7
|
-
AllCops:
|
8
|
-
TargetRubyVersion: 2.3
|
9
|
-
Rails:
|
10
|
-
Enabled: true
|
data/.travis.yml
DELETED
data/docs/installation.adoc
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
= Installation
|
2
|
-
|
3
|
-
The `metanorma` command-line executable gets installed via a Ruby gem.
|
4
|
-
Depending on your use case, you may need to install Puppeteer Node package.
|
5
|
-
|
6
|
-
== Installing the Metanorma CLI gem
|
7
|
-
|
8
|
-
[source,console]
|
9
|
-
----
|
10
|
-
gem install metanorma-cli
|
11
|
-
----
|
12
|
-
|
13
|
-
== Installing Puppeteer
|
14
|
-
|
15
|
-
If you are going to generate PDFs from HTML (which applies to CalConnect Standard Documents),
|
16
|
-
you will also need to install the https://github.com/GoogleChrome/puppeteer[Puppeteer] Node library:
|
17
|
-
|
18
|
-
* Ensure you have Node at least 7.6.0:
|
19
|
-
** https://nodejs.org/en/download/
|
20
|
-
** On macOS you should be able to `brew install node`
|
21
|
-
* Ensure you have NPM: https://docs.npmjs.com/getting-started/installing-node
|
22
|
-
* Install Puppeteer globally in your system: `npm install -g --save --save-exact puppeteer`
|
data/docs/navigation.adoc
DELETED
data/docs/usage.adoc
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
= Using the Metanorma CLI
|
2
|
-
|
3
|
-
== Usage sample
|
4
|
-
|
5
|
-
[source,sh]
|
6
|
-
----
|
7
|
-
$ metanorma --type iso -x html iso-my-standard-document.adoc
|
8
|
-
----
|
9
|
-
|
10
|
-
== Full syntax & options
|
11
|
-
|
12
|
-
[source,sh]
|
13
|
-
----
|
14
|
-
$ metanorma --type <chosen-type> \
|
15
|
-
[--format input-format] \
|
16
|
-
[--extensions EXT1,EXT2...] \
|
17
|
-
iso-my-standard-document.adoc
|
18
|
-
----
|
19
|
-
|
20
|
-
`type`:: (mandatory, specified via `--type` or `-t`) takes one of the following types:
|
21
|
-
`rfc2`, `rfc3`, `iso`, `gb`, `csd`, `csand`, `m3d`, `rsd`. Each of these corresponds to a
|
22
|
-
standards class and a Metanorma gem; the list of standards classes supported by the script
|
23
|
-
by default will grow (see also `require`).
|
24
|
-
|
25
|
-
`extension`:: (optional) specifies the output formats to be generated. If not specified,
|
26
|
-
all possible output formats are generated. The output formats generated are constrained by
|
27
|
-
what has been defined for each standard type. All standards can generate Metanorma XML (`xml`),
|
28
|
-
and at least one of HTML (`html`), DOC (`doc`), PDF (`pdf`). Some standards generate alternative
|
29
|
-
HTML renderings (e.g. `html_alt` for ISO).
|
30
|
-
|
31
|
-
`wrapper`:: create a separate folder for each instance of HTML output generated; the folder is named
|
32
|
-
the same as the output file, without the `.html` suffix. Used to make distribution of HTML outputs
|
33
|
-
more straightforward.
|
34
|
-
|
35
|
-
`format`:: (optional, defaults to `asciidoc`, specified via `--format` or `-f`) only accepts `asciidoc` for now
|
36
|
-
|
37
|
-
`require`:: If you wish to use metanorma with a document class which has not been included in the types recognised
|
38
|
-
by the metanorma script, you will need to name the corresponding Metnorma gem explicitly with the `-r`
|
39
|
-
option. For example:
|
40
|
-
|
41
|
-
[source,sh]
|
42
|
-
----
|
43
|
-
$ metanorma -t mpfd mpfd-bpn.adoc
|
44
|
-
|
45
|
-
[metanorma] Error: mpfd is not a supported standard type.
|
46
|
-
|
47
|
-
$ metanorma -t mpfd -r metanorma-mpfd mpfd-bpn.adoc
|
48
|
-
----
|
49
|
-
|
50
|
-
== Command-line help
|
51
|
-
|
52
|
-
[source,sh]
|
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
|
74
|
-
----
|