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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae92d14760f740cf2e0cfcb5502a9fca6cf5db3cc9409c0cd3a37a20fbe1e7ec
4
- data.tar.gz: bd369ff18dcec200ceb9c6aedb983396a972361cf7829882d129b2b7582d3e27
3
+ metadata.gz: 89e2b288554021ed0d80a8425d488ac456f0610e3d8f2536f87d3b024fcc0c45
4
+ data.tar.gz: c2613fc25742f38cdcb69aff49317da995f0e16da6e2c0f9ce744cff62a137e2
5
5
  SHA512:
6
- metadata.gz: 31412b19dfb8c8d1d5e5372f79a4c109943e4f13ba9a615633b951e9f02017fe95cf6a878ed04f72e053d193593ddbe8aa65a37d09ddb79f5e768279371b6628
7
- data.tar.gz: 5cc24d14bcc024167b05313996da2e9a22cc9a7ebfc266223b2d9cf2fad976132a53f9554a56d01226bc05f59614b25657a1119e8f75997c4e6f19833c86953b
6
+ metadata.gz: 804bdc4101f46715e3445017094995a8a6e431e4c8ec07e70a7cf112c797d8c28884bcf7a2821eae13509393197fd75ee13cd13fb266870d8de9281e1217ef3d
7
+ data.tar.gz: 4b1f5384aeea20b08490524a7b788a53337311b4142e79858d3c05b070253d0f9624f71a3dd1947f05cec3d4efe6018667ca6c9ff51cefbe7d5f9d5660a0513c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metanorma (0.2.9)
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.4)
15
+ nokogiri (1.8.5)
16
16
  mini_portile2 (~> 2.3.0)
17
17
  rake (10.5.0)
18
18
  rspec (3.8.0)
@@ -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-models[Metanorma document model (previously called 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/isodoc-models/[IsoDoc Models],
29
- the https://github.com/riboseinc/asciidoctor-iso/[asciidoctor-iso IsoDoc implementation]
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 Models],
33
- the https://github.com/riboseinc/asciidoctor-csd/[asciidoctor-csd implementation]
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/gbdoc[GbDoc Models],
37
- the https://github.com/riboseinc/asciidoctor-gb/[asciidoctor-gb implementation]
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 Models],
41
- the https://github.com/riboseinc/asciidoctor-csand/[asciidoctor-csand implementation]
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 Models],
45
- the https://github.com/riboseinc/asciidoctor-m3d/[asciidoctor-m3d implementation]
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/asciidoctor-rsd[asciidoctor-rsd implementation]
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
- === All-in-one install, MacOS
52
+ === MacOS
53
53
 
54
- macOS users can directly run the Metanorma setup script located here:
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
- === Installation, https://www.ubuntu.com[Ubuntu]
61
+ Alternatively, you can also use the Metanorma Docker container (see below).
61
62
 
62
- [source,sh]
63
- ----
64
- # Set up prerequisites
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
- (You may need to run these as `sudo`)
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 Mac, `brew install node`)
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
 
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
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.9
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-09-15 00:00:00.000000000 Z
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler