metanorma 0.2.9 → 0.2.10
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 +2 -2
- data/README.adoc +40 -28
- data/lib/metanorma/input/asciidoc.rb +2 -0
- data/lib/metanorma/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89e2b288554021ed0d80a8425d488ac456f0610e3d8f2536f87d3b024fcc0c45
|
|
4
|
+
data.tar.gz: c2613fc25742f38cdcb69aff49317da995f0e16da6e2c0f9ce744cff62a137e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 804bdc4101f46715e3445017094995a8a6e431e4c8ec07e70a7cf112c797d8c28884bcf7a2821eae13509393197fd75ee13cd13fb266870d8de9281e1217ef3d
|
|
7
|
+
data.tar.gz: 4b1f5384aeea20b08490524a7b788a53337311b4142e79858d3c05b070253d0f9624f71a3dd1947f05cec3d4efe6018667ca6c9ff51cefbe7d5f9d5660a0513c
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
metanorma (0.2.
|
|
4
|
+
metanorma (0.2.10)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
@@ -12,7 +12,7 @@ GEM
|
|
|
12
12
|
nokogiri (>= 1.4.3)
|
|
13
13
|
mini_portile2 (2.3.0)
|
|
14
14
|
mixlib-shellout (2.4.0)
|
|
15
|
-
nokogiri (1.8.
|
|
15
|
+
nokogiri (1.8.5)
|
|
16
16
|
mini_portile2 (~> 2.3.0)
|
|
17
17
|
rake (10.5.0)
|
|
18
18
|
rspec (3.8.0)
|
data/README.adoc
CHANGED
|
@@ -19,58 +19,59 @@ document model.
|
|
|
19
19
|
|
|
20
20
|
Metanorma includes the following sub-projects:
|
|
21
21
|
|
|
22
|
-
* The https://github.com/riboseinc/standoc
|
|
22
|
+
* The https://github.com/riboseinc/metanorma-model-standoc[Metanorma Standard Document model]
|
|
23
23
|
|
|
24
24
|
* IETF Internet-Drafts and RFCs: the https://datatracker.ietf.org/doc/draft-ribose-asciirfc/[AsciiRFC syntax],
|
|
25
25
|
the https://github.com/riboseinc/asciidoctor-rfc/[asciidoctor-rfc RFC XML v2 and v3 implementations]
|
|
26
26
|
|
|
27
27
|
* ISO Standards: the AsciiISO syntax,
|
|
28
|
-
the https://github.com/riboseinc/
|
|
29
|
-
the https://github.com/riboseinc/
|
|
28
|
+
the https://github.com/riboseinc/metanorma-model-iso/[Metanorma ISO model],
|
|
29
|
+
the https://github.com/riboseinc/metanorma-iso/[metanorma-iso IsoDoc implementation]
|
|
30
30
|
|
|
31
31
|
* CalConnect Standard Documents (CSD): the AsciiCSD syntax,
|
|
32
|
-
https://github.com/riboseinc/csd[CSD
|
|
33
|
-
the https://github.com/riboseinc/
|
|
32
|
+
https://github.com/riboseinc/metanorma-model-csd[Metanorma CSD model],
|
|
33
|
+
the https://github.com/riboseinc/metanorma-csd/[metanorma-csd implementation]
|
|
34
34
|
|
|
35
35
|
* Chinese GuoBiao (GB) Standards: the AsciiGB syntax,
|
|
36
|
-
https://github.com/riboseinc/
|
|
37
|
-
the https://github.com/riboseinc/
|
|
36
|
+
https://github.com/riboseinc/metanorma-model-gb[Metanorma GB models, for Chinese standards],
|
|
37
|
+
the https://github.com/riboseinc/metanorma-gb/[metanorma-gb implementation]
|
|
38
38
|
|
|
39
39
|
* Cloud Security Alliance Normal Documents (CSAND): the AsciiCSAND syntax,
|
|
40
|
-
https://github.com/riboseinc/csand[CSAND
|
|
41
|
-
the https://github.com/riboseinc/
|
|
40
|
+
https://github.com/riboseinc/metanorma-model-csand[Metanorma CSAND model],
|
|
41
|
+
the https://github.com/riboseinc/metanorma-csand/[metanorma-csand implementation]
|
|
42
42
|
|
|
43
43
|
* M3AAWG Documents (M3D): the AsciiM3D syntax,
|
|
44
|
-
https://github.com/riboseinc/m3d[M3D
|
|
45
|
-
the https://github.com/riboseinc/
|
|
44
|
+
https://github.com/riboseinc/metanorma-model-m3d[Metanorma M3D model],
|
|
45
|
+
the https://github.com/riboseinc/metanorma-m3d/[metanorma-m3d implementation]
|
|
46
46
|
|
|
47
|
-
//* Ribose Specification Documents (RSD): AsciiRSD, RSD XML schema, and the https://github.com/riboseinc/
|
|
47
|
+
//* Ribose Specification Documents (RSD): AsciiRSD, RSD XML schema, and the https://github.com/riboseinc/metanorma-rsd[metanorma-rsd implementation]
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
== Installation
|
|
50
|
+
== Installation on supported platforms
|
|
51
51
|
|
|
52
|
-
===
|
|
52
|
+
=== MacOS
|
|
53
53
|
|
|
54
|
-
macOS users
|
|
54
|
+
We recommend macOS users to directly run the Metanorma setup script
|
|
55
|
+
located here:
|
|
55
56
|
https://github.com/riboseinc/metanorma-macos-setup
|
|
56
57
|
|
|
57
58
|
This is a one-stop installation script that setups Ruby, Node
|
|
58
59
|
and all necessary parts for running Metanorma.
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
Alternatively, you can also use the Metanorma Docker container (see below).
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
apt-get update
|
|
66
|
-
apt install -y git make ruby-bundler ruby-dev libxml2-dev libxslt-dev default-jre
|
|
67
|
-
gem install bundler
|
|
68
|
-
gem install nokogiri -v '1.8.4'
|
|
69
|
-
gem install metanorma-cli
|
|
70
|
-
----
|
|
63
|
+
=== Linux
|
|
64
|
+
|
|
65
|
+
Please see: https://github.com/riboseinc/metanorma-linux-setup
|
|
71
66
|
|
|
72
|
-
|
|
67
|
+
Alternatively, you can also use the Metanorma Docker container (see below).
|
|
73
68
|
|
|
69
|
+
=== Docker: Windows and other platforms
|
|
70
|
+
|
|
71
|
+
Please use the Metanorma Docker container: https://github.com/riboseinc/metanorma-docker
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
////
|
|
74
75
|
If you want to run Ubuntu on MacOS, you should do the following beforehand:
|
|
75
76
|
|
|
76
77
|
[source,sh]
|
|
@@ -86,6 +87,7 @@ dinghy up
|
|
|
86
87
|
eval $(dinghy env)
|
|
87
88
|
docker run -it ubuntu:18.10 bash
|
|
88
89
|
----
|
|
90
|
+
////
|
|
89
91
|
|
|
90
92
|
=== Installing individual components
|
|
91
93
|
|
|
@@ -100,7 +102,7 @@ If you are going to generate PDFs from HTML (which applies to CSD), you will als
|
|
|
100
102
|
the node library https://github.com/GoogleChrome/puppeteer:
|
|
101
103
|
|
|
102
104
|
* Install Node, with at least version 7.6.0: https://nodejs.org/en/download/,
|
|
103
|
-
https://nodejs.org/en/download/package-manager/ . (For
|
|
105
|
+
https://nodejs.org/en/download/package-manager/ . (For macOS, `brew install node`)
|
|
104
106
|
* Install npm: https://docs.npmjs.com/getting-started/installing-node
|
|
105
107
|
* Install puppeteer: `npm install -g --save --save-exact puppeteer`
|
|
106
108
|
|
|
@@ -129,6 +131,9 @@ Usage: metanorma [options] <file>
|
|
|
129
131
|
missing, all available extensions are generated.
|
|
130
132
|
-f, --format FORMAT Format of source file: asciidoc (current default, only format supported)
|
|
131
133
|
-r, --require LIBRARY Require LIBRARY prior to execution
|
|
134
|
+
-w, --wrapper Create wrapper folder for HTML output
|
|
135
|
+
-d, --data-uri-image Encode HTML output images as data URIs
|
|
136
|
+
-R, --relaton FILENAME Export Relaton XML (bibdata) for this document to FILENAME
|
|
132
137
|
-h, --help Show this message
|
|
133
138
|
----
|
|
134
139
|
|
|
@@ -142,7 +147,7 @@ $ metanorma --type <chosen-type> [--format input-format] [--extensions EXT1,EXT2
|
|
|
142
147
|
Options:
|
|
143
148
|
|
|
144
149
|
`type`:: (mandatory, specified via `--type` or `-t`) takes one of the following types:
|
|
145
|
-
`rfc2`, `rfc3`, `iso`, `gb`, `csd`, `csand`, `m3d`, `rsd`. Each of these corresponds to a
|
|
150
|
+
`rfc2`, `rfc3`, `iso`, `gb`, `csd`, `csand`, `m3d`, `rsd`. Each of these corresponds to a
|
|
146
151
|
standards class and a Metanorma gem; the list of standards classes supported by the script
|
|
147
152
|
by default will grow (see also `require`).
|
|
148
153
|
|
|
@@ -152,6 +157,13 @@ what has been defined for each standard type. All standards can generate Metanor
|
|
|
152
157
|
and at least one of HTML (`html`), DOC (`doc`), PDF (`pdf`). Some standards generate alternative
|
|
153
158
|
HTML renderings (e.g. `html_alt` for ISO).
|
|
154
159
|
|
|
160
|
+
`wrapper`:: create a separate folder for each instance of HTML output generated; the folder is named
|
|
161
|
+
the same as the output file, without the `.html` suffix. Used to make distribution of HTML outputs
|
|
162
|
+
more straightforward.
|
|
163
|
+
|
|
164
|
+
`relaton`:: exports the bibdata Relaton XML description of the document (which is part of its Metanorma XML)
|
|
165
|
+
to the nominated directory. The filename is the document identifier, if present, else the document filename.
|
|
166
|
+
|
|
155
167
|
`format`:: (optional, specified via `--format` or `-f`) only accepts `asciidoc` for now,
|
|
156
168
|
defaults to `asciidoc`
|
|
157
169
|
|
|
@@ -36,6 +36,7 @@ module Metanorma
|
|
|
36
36
|
/\n:wordintropage: (?<wordintropage>[^\n]+)\n/ =~ header
|
|
37
37
|
/\n:ulstyle: (?<ulstyle>[^\n]+)\n/ =~ header
|
|
38
38
|
/\n:olstyle: (?<olstyle>[^\n]+)\n/ =~ header
|
|
39
|
+
/\n(?<datauriimage>:data-uri-image:[^\n]*)\n/ =~ header
|
|
39
40
|
{
|
|
40
41
|
script: defined?(script) ? script : nil,
|
|
41
42
|
bodyfont: defined?(bodyfont) ? bodyfont : nil,
|
|
@@ -55,6 +56,7 @@ module Metanorma
|
|
|
55
56
|
wordintropage: defined?(wordintropage) ? wordintropage : nil,
|
|
56
57
|
ulstyle: defined?(ulstyle) ? ulstyle : nil,
|
|
57
58
|
olstyle: defined?(olstyle) ? olstyle : nil,
|
|
59
|
+
data_uri_image: defined?(datauriimage) ? true : nil,
|
|
58
60
|
}.reject { |_, val| val.nil? }
|
|
59
61
|
end
|
|
60
62
|
|
data/lib/metanorma/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|