metanorma 1.1.6 → 1.1.7

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: aecd92b31139e0a3f76ff7485f3bde8e5b6d89be735eafadc0215962b8b1aec1
4
- data.tar.gz: 4c00ec06b3d9a632bbdbc810aa46635fef4c85f88382c6e014a8238261987f7e
3
+ metadata.gz: f6bdfc7913fb212cb141c23550aacaf2dd5c4261feea33946760a4b22af68298
4
+ data.tar.gz: 2a2fc2ae5c8b193b21063b368b8f6cac542dc98662e0376787d946020fe1e2b7
5
5
  SHA512:
6
- metadata.gz: 570efb165e57540e107f6f29acd53a373d702c825eefd1c9ee3e04fac4644432fc9347400dea3a1b48f8aa03c28ac31634bd4a3545dc86622768d2285a9cb87f
7
- data.tar.gz: 554df7349b548f35d6fbf3f04d453964c3aa7a9067c496f4815eed42de07ceeaca4b93a7278f41709343744569c7c45b096916b184050366369597b22281ed46
6
+ metadata.gz: 939e66856ea7e3bcdba7f67771606913e8510be72d52ac09dd22643cdc155b7cc2ed41c09a2a5fed32c322470ca44c2fe975c941eb0d0581d39f5cd775aac723
7
+ data.tar.gz: f6cf21861fe6154831fb4e47b93b88224bb3d65f37ea2496fd2c0c868e1836d1b590b1a67376229fefed57c019b97ec9ef5adef8a7d84d8ef0f8af9b29c322c8
@@ -47,7 +47,7 @@ module Metanorma
47
47
  Nokogiri::XML::Builder.new do |xml|
48
48
  xml.send("metanorma-collection",
49
49
  "xmlns" => "http://metanorma.org") do |mc|
50
- @bibdata.to_xml mc, bibdata: true, date_format: :full
50
+ mc << @bibdata.to_xml(bibdata: true, date_format: :full)
51
51
  @manifest.to_xml mc
52
52
  content_to_xml "prefatory", mc
53
53
  doccontainer mc
@@ -54,7 +54,8 @@ module Metanorma
54
54
  end
55
55
 
56
56
  def concatenate(col, options)
57
- options[:format].each do |e|
57
+ options[:format] << :presentation if options[:format].include?(:pdf)
58
+ options[:format].uniq.each do |e|
58
59
  next unless %i(presentation xml).include?(e)
59
60
  ext = e == :presentation ? "presentation.xml" : e.to_s
60
61
  out = col.clone
@@ -65,6 +66,13 @@ module Metanorma
65
66
  end
66
67
  File.open(File.join(@outdir, "collection.#{ext}"), "w:UTF-8") { |f| f.write(out.to_xml) }
67
68
  end
69
+ options[:format].include?(:pdf) and
70
+ pdfconv.convert(File.join(@outdir, "collection.presentation.xml"))
71
+ end
72
+
73
+ def pdfconv
74
+ x = Asciidoctor.load nil, backend: @doctype.to_sym
75
+ x.converter.pdf_converter(Dummy.new)
68
76
  end
69
77
 
70
78
  # Dummy class
@@ -86,7 +86,7 @@ module Metanorma
86
86
  if @raw
87
87
  builder << @bibitem.root.to_xml
88
88
  else
89
- builder.send(type + "-standard") { |b| @bibitem.to_xml b, bibdata: true }
89
+ builder.send(type + "-standard") { |b| b << @bibitem.to_xml(bibdata: true) }
90
90
  end
91
91
  end
92
92
  end
@@ -4,10 +4,10 @@ require_relative "./utils.rb"
4
4
  module Metanorma
5
5
  module Output
6
6
  class XslfoPdf < Base
7
- def convert(url_path, output_path, xsl_stylesheet)
7
+ def convert(url_path, output_path, xsl_stylesheet, options = "")
8
8
  return if url_path.nil? || output_path.nil? || xsl_stylesheet.nil?
9
9
 
10
- Mn2pdf.convert(quote(url_path), quote(output_path), quote(xsl_stylesheet))
10
+ Mn2pdf.convert(quote(url_path), quote(output_path), quote(xsl_stylesheet), options)
11
11
  end
12
12
 
13
13
  def quote(x)
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
@@ -37,5 +37,6 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "rspec-command", "~> 1.0"
38
38
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
39
39
  spec.add_development_dependency "metanorma-iso", "~> 1.5.8"
40
+ spec.add_development_dependency "sassc", "~> 2.4.0"
40
41
  #spec.add_development_dependency "isodoc", "~> 1.2.1"
41
42
  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: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-26 00:00:00.000000000 Z
11
+ date: 2020-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: 1.5.8
153
+ - !ruby/object:Gem::Dependency
154
+ name: sassc
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 2.4.0
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 2.4.0
153
167
  description: Library to process any Metanorma standard.
154
168
  email:
155
169
  - open.source@ribose.com