metanorma-rsd 1.1.0 → 1.1.1

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: 0c5152e4335a14f4046d5f257d79a7c480e8c1ec1a6dc986436bac11fb02a5ae
4
- data.tar.gz: a67ed2acc1cd9b63c44b835f295ad4f50e9301c2976302eda0c0b8bd9be5eaa0
3
+ metadata.gz: 6448706fcd04c9dc78d542e523bb0d92cda418aa51f14b68cbd28137d55c9616
4
+ data.tar.gz: 11e87ff974e0ef8eddbea3d8ab8c144ec006da5e6a5fa2d00ef82c3fd8af2a94
5
5
  SHA512:
6
- metadata.gz: d27d521ed8ac4fb8e3d17ebbbf324b6f8243271f89ccaa62f2fc98499022855c67f0f6df3e61baa341a159e934767bce493b8bfa64c981eee703d451cb814ebf
7
- data.tar.gz: fd42ea20421e77d073a575d37a19092f8399694e6d551cd24243bd66f715de682220e0a644c910a00620d113682e0aa5b001a7d2295d395f71b171cc7e8c35ef
6
+ metadata.gz: 16b371c9881cdeb3aef534616b92af25b04ee875e975fc13833022ad97e0d54b8b9906dbccba9886ebaff41338d1c3283cf4435c6746fa817e39849889735b66
7
+ data.tar.gz: 946fb2d9dc81cdb8733d72eb7f6af3d11116f103d3868ccf7596de609d3ec9395acc42da3a0b20b0a9aa79310d5cfa29213694f4c62c40a3aa4a52e40aa32d9e
@@ -100,7 +100,7 @@ module Asciidoctor
100
100
  result << noko { |ixml| front node, ixml }
101
101
  result << noko { |ixml| middle node, ixml }
102
102
  result << "</rsd-standard>"
103
- result = textcleanup(result.flatten * "\n")
103
+ result = textcleanup(result)
104
104
  ret1 = cleanup(Nokogiri::XML(result))
105
105
  validate(ret1)
106
106
  ret1.root.add_namespace(nil, RSD_NAMESPACE)
@@ -117,13 +117,6 @@ module Asciidoctor
117
117
  d
118
118
  end
119
119
 
120
- def pdf_convert(filename)
121
- url = "#{Dir.pwd}/#{filename}.html"
122
- pdfjs = File.join(File.dirname(__FILE__), 'pdf.js')
123
- system "export NODE_PATH=$(npm root --quiet -g);
124
- node #{pdfjs} file://#{url} #{filename}.pdf"
125
- end
126
-
127
120
  def document(node)
128
121
  init(node)
129
122
  ret1 = makexml(node)
@@ -133,8 +126,8 @@ module Asciidoctor
133
126
  gsub(%r{^.*/}, "")
134
127
  File.open(filename, "w") { |f| f.write(ret) }
135
128
  html_converter(node).convert filename unless node.attr("nodoc")
129
+ pdf_converter(node).convert filename unless node.attr("nodoc")
136
130
  word_converter(node).convert filename unless node.attr("nodoc")
137
- pdf_convert(filename.sub(/\.xml$/, "")) unless node.attr("nodoc")
138
131
  end
139
132
  @files_to_delete.each { |f| FileUtils.rm f }
140
133
  ret
@@ -165,6 +158,10 @@ module Asciidoctor
165
158
  IsoDoc::Rsd::HtmlConvert.new(html_extract_attributes(node))
166
159
  end
167
160
 
161
+ def pdf_converter(node)
162
+ IsoDoc::Rsd::PdfConvert.new(html_extract_attributes(node))
163
+ end
164
+
168
165
  def word_converter(node)
169
166
  IsoDoc::Rsd::WordConvert.new(doc_extract_attributes(node))
170
167
  end
@@ -493,6 +493,9 @@
493
493
  <attribute name="id">
494
494
  <data type="ID"/>
495
495
  </attribute>
496
+ <optional>
497
+ <attribute name="lang"/>
498
+ </optional>
496
499
  <optional>
497
500
  <ref name="tname"/>
498
501
  </optional>
@@ -45,7 +45,14 @@
45
45
  </div>
46
46
 
47
47
  <div class="coverpage-stage-block" >
48
- <p><span class="coverpage-maturity" id="{{ status | replace: ' ', '-' | downcase }}">{% if unpublished %}{{ status }}{% endif %}</span></p>
48
+ <p><span class="coverpage-maturity" id="{{ status | replace: ' ', '-' | downcase }}">
49
+ {%- if unpublished -%}
50
+ {{- status -}}
51
+ {%- else -%}
52
+ {%- if publisheddate and publisheddate != "XXXX" -%}
53
+ Published {{ publisheddate -}}
54
+ {%- endif -%}
55
+ {%- endif -%}</span></p>
49
56
  {% if security %}
50
57
  <p><span class="coverpage-maturity">Classification: {{ security }}</span></p>
51
58
  {% endif %}
@@ -633,6 +633,10 @@ p.Biblio, p.NormRef {
633
633
  margin-left:-1.5em;
634
634
  }
635
635
 
636
+ .example .Sourcecode {
637
+ background: none;
638
+ }
639
+
636
640
  /*
637
641
  3.9 Tables
638
642
  */
@@ -17,7 +17,17 @@ margin-left:4.25pt;margin-right:4.25pt'>
17
17
 
18
18
  <p class="MsoNormal" align="center" style='text-align:center;border:none;
19
19
  mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span
20
- lang="EN-GB" style='font-size:16.0pt'>{% if unpublished %}{{ status }} {% endif %}{{ doctype }}</span></p>
20
+ lang="EN-GB" style='font-size:16.0pt'>{%- if unpublished -%}
21
+ {{- status -}}
22
+ {%- else -%}
23
+ {%- if publisheddate and publisheddate != "XXXX" -%}
24
+ Published {{ publisheddate -}}
25
+ {%- endif -%}
26
+ {%- endif %}</span></p>
27
+
28
+ <p class="MsoNormal" align="center" style='text-align:center;border:none;
29
+ mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span
30
+ lang="EN-GB" style='font-size:16.0pt'>Ribose {{ doctype }}</span></p>
21
31
 
22
32
 
23
33
  {% if security %}
@@ -1075,6 +1075,107 @@ p.Tablebody, li.Tablebody, div.Tablebody
1075
1075
  margin-left:162.0pt;
1076
1076
  text-indent:-18.0pt;}
1077
1077
 
1078
+ p.ListContLevel1, li.ListContLevel1, div.ListContLevel1
1079
+ {mso-style-priority:34;
1080
+ margin-top:0cm;
1081
+ margin-left:18.0pt;
1082
+ margin-right:0cm;
1083
+ margin-bottom:12.0pt;
1084
+ mso-pagination:widow-orphan;
1085
+ font-size:11.0pt;
1086
+ font-family:$bodyfont;
1087
+ mso-ansi-language:EN-AU;
1088
+ mso-fareast-language:EN-US;}
1089
+ p.ListContLevel2, li.ListContLevel2, div.ListContLevel2
1090
+ {mso-style-priority:34;
1091
+ margin-top:0cm;
1092
+ margin-left:36.0pt;
1093
+ margin-right:0cm;
1094
+ margin-bottom:12.0pt;
1095
+ mso-pagination:widow-orphan;
1096
+ font-size:11.0pt;
1097
+ font-family:$bodyfont;
1098
+ mso-ansi-language:EN-AU;
1099
+ mso-fareast-language:EN-US;}
1100
+ p.ListContLevel3, li.ListContLevel3, div.ListContLevel3
1101
+ {mso-style-priority:34;
1102
+ margin-top:0cm;
1103
+ margin-left:54.0pt;
1104
+ margin-right:0cm;
1105
+ margin-bottom:12.0pt;
1106
+ mso-pagination:widow-orphan;
1107
+ font-size:11.0pt;
1108
+ font-family:$bodyfont;
1109
+ mso-ansi-language:EN-AU;
1110
+ mso-fareast-language:EN-US;}
1111
+ p.ListContLevel4, li.ListContLevel4, div.ListContLevel4
1112
+ {mso-style-priority:34;
1113
+ margin-top:0cm;
1114
+ margin-left:72.0pt;
1115
+ margin-right:0cm;
1116
+ margin-bottom:12.0pt;
1117
+ mso-pagination:widow-orphan;
1118
+ font-size:11.0pt;
1119
+ font-family:$bodyfont;
1120
+ mso-ansi-language:EN-AU;
1121
+ mso-fareast-language:EN-US;}
1122
+ p.ListContLevel5, li.ListContLevel5, div.ListContLevel5
1123
+ {mso-style-priority:34;
1124
+ margin-top:0cm;
1125
+ margin-left:90.0pt;
1126
+ margin-right:0cm;
1127
+ margin-bottom:12.0pt;
1128
+ mso-pagination:widow-orphan;
1129
+ font-size:11.0pt;
1130
+ font-family:$bodyfont;
1131
+ mso-ansi-language:EN-AU;
1132
+ mso-fareast-language:EN-US;}
1133
+ p.ListContLevel6, li.ListContLevel6, div.ListContLevel6
1134
+ {mso-style-priority:34;
1135
+ margin-top:0cm;
1136
+ margin-left:108.0pt;
1137
+ margin-right:0cm;
1138
+ margin-bottom:12.0pt;
1139
+ mso-pagination:widow-orphan;
1140
+ font-size:11.0pt;
1141
+ font-family:$bodyfont;
1142
+ mso-ansi-language:EN-AU;
1143
+ mso-fareast-language:EN-US;}
1144
+ p.ListContLevel7, li.ListContLevel7, div.ListContLevel7
1145
+ {mso-style-priority:34;
1146
+ margin-top:0cm;
1147
+ margin-left:126.0pt;
1148
+ margin-right:0cm;
1149
+ margin-bottom:12.0pt;
1150
+ mso-pagination:widow-orphan;
1151
+ font-size:11.0pt;
1152
+ font-family:$bodyfont;
1153
+ mso-ansi-language:EN-AU;
1154
+ mso-fareast-language:EN-US;}
1155
+ p.ListContLevel8, li.ListContLevel8, div.ListContLevel8
1156
+ {mso-style-priority:34;
1157
+ margin-top:0cm;
1158
+ margin-left:144.0pt;
1159
+ margin-right:0cm;
1160
+ margin-bottom:12.0pt;
1161
+ mso-pagination:widow-orphan;
1162
+ font-size:11.0pt;
1163
+ font-family:$bodyfont;
1164
+ mso-ansi-language:EN-AU;
1165
+ mso-fareast-language:EN-US;}
1166
+ p.ListContLevel9, li.ListContLevel9, div.ListContLevel9
1167
+ {mso-style-priority:34;
1168
+ margin-top:0cm;
1169
+ margin-left:162.0pt;
1170
+ margin-right:0cm;
1171
+ margin-bottom:12.0pt;
1172
+ mso-pagination:widow-orphan;
1173
+ font-size:11.0pt;
1174
+ font-family:$bodyfont;
1175
+ mso-ansi-language:EN-AU;
1176
+ mso-fareast-language:EN-US;}
1177
+
1178
+
1078
1179
  table.MsoNormalTable
1079
1180
  {mso-style-name:"Table Normal";
1080
1181
  mso-tstyle-rowband-size:0;
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Rsd
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-rsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-21 00:00:00.000000000 Z
11
+ date: 2019-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -249,7 +249,6 @@ files:
249
249
  - lib/asciidoctor/rsd/converter.rb
250
250
  - lib/asciidoctor/rsd/isodoc.rng
251
251
  - lib/asciidoctor/rsd/isostandard.rng
252
- - lib/asciidoctor/rsd/pdf.js
253
252
  - lib/asciidoctor/rsd/rsd.rng
254
253
  - lib/isodoc/rsd/html/header.html
255
254
  - lib/isodoc/rsd/html/html_rsd_intro.html
@@ -1,31 +0,0 @@
1
- 'use strict';
2
-
3
- try {
4
- require.resolve("puppeteer");
5
- } catch(e) {
6
- console.error("puppeteer Node library is not installed; will not generate PDF");
7
- process.exit(e.code);
8
- }
9
-
10
- const puppeteer = require('puppeteer');
11
-
12
- const createPdf = async() => {
13
- let browser;
14
- try {
15
- browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
16
- const page = await browser.newPage();
17
- await page.goto(process.argv[2], {waitUntil: 'networkidle2'});
18
- await page.pdf({
19
- path: process.argv[3],
20
- format: 'A4'
21
- });
22
- } catch (err) {
23
- console.log(err.message);
24
- } finally {
25
- if (browser) {
26
- browser.close();
27
- }
28
- process.exit();
29
- }
30
- };
31
- createPdf();