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 +4 -4
- data/lib/metanorma/collection.rb +1 -1
- data/lib/metanorma/collection_renderer.rb +9 -1
- data/lib/metanorma/document.rb +1 -1
- data/lib/metanorma/output/xslfo.rb +2 -2
- data/lib/metanorma/version.rb +1 -1
- data/metanorma.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6bdfc7913fb212cb141c23550aacaf2dd5c4261feea33946760a4b22af68298
|
4
|
+
data.tar.gz: 2a2fc2ae5c8b193b21063b368b8f6cac542dc98662e0376787d946020fe1e2b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 939e66856ea7e3bcdba7f67771606913e8510be72d52ac09dd22643cdc155b7cc2ed41c09a2a5fed32c322470ca44c2fe975c941eb0d0581d39f5cd775aac723
|
7
|
+
data.tar.gz: f6cf21861fe6154831fb4e47b93b88224bb3d65f37ea2496fd2c0c868e1836d1b590b1a67376229fefed57c019b97ec9ef5adef8a7d84d8ef0f8af9b29c322c8
|
data/lib/metanorma/collection.rb
CHANGED
@@ -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
|
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]
|
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
|
data/lib/metanorma/document.rb
CHANGED
@@ -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)
|
data/lib/metanorma/version.rb
CHANGED
data/metanorma.gemspec
CHANGED
@@ -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.
|
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-
|
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
|