metanorma-csa 1.4.12 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,18 +13,8 @@ module IsoDoc
13
13
  super
14
14
  end
15
15
 
16
- def convert(filename, file = nil, debug = false)
17
- file = File.read(filename, encoding: "utf-8") if file.nil?
18
- docxml, outname_html, dir = convert_init(file, filename, debug)
19
- /\.xml$/.match(filename) or
20
- filename = Tempfile.open([outname_html, ".xml"], encoding: "utf-8") do |f|
21
- f.write file
22
- f.path
23
- end
24
- FileUtils.rm_rf dir
25
- ::Metanorma::Output::XslfoPdf.new.convert(
26
- filename, outname_html + ".pdf",
27
- File.join(@libdir, "csa.standard.xsl"))
16
+ def pdf_stylesheet(docxml)
17
+ "csa.standard.xsl"
28
18
  end
29
19
  end
30
20
  end
@@ -0,0 +1,10 @@
1
+ require_relative "base_convert"
2
+ require "isodoc"
3
+
4
+ module IsoDoc
5
+ module Csa
6
+ class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
7
+ end
8
+ end
9
+ end
10
+
@@ -37,14 +37,16 @@ module Metanorma
37
37
  Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
38
38
  end
39
39
 
40
- def output(isodoc_node, outname, format, options={})
40
+ def output(isodoc_node, inname, outname, format, options={})
41
41
  case format
42
42
  when :html
43
- IsoDoc::Csa::HtmlConvert.new(options).convert(outname, isodoc_node)
43
+ IsoDoc::Csa::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
44
44
  when :doc
45
- IsoDoc::Csa::WordConvert.new(options).convert(outname, isodoc_node)
45
+ IsoDoc::Csa::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
46
46
  when :pdf
47
- IsoDoc::Csa::PdfConvert.new(options).convert(outname, isodoc_node)
47
+ IsoDoc::Csa::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname)
48
+ when :presentation
49
+ IsoDoc::Csa::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
48
50
  else
49
51
  super
50
52
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Metanorma
4
4
  module Csa
5
- VERSION = '1.4.12'
5
+ VERSION = '1.5.0'
6
6
  end
7
7
  end
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_dependency "uuidtools"
38
38
 
39
39
  spec.add_dependency "metanorma-standoc", "~> 1.4.0"
40
- spec.add_dependency "isodoc", "~> 1.0.0"
40
+ spec.add_dependency "isodoc", "~> 1.1.0"
41
41
 
42
42
  spec.add_development_dependency "byebug", "~> 9.1"
43
43
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.12
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-08 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.0.0
117
+ version: 1.1.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.0.0
124
+ version: 1.1.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: byebug
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -301,6 +301,7 @@ files:
301
301
  - lib/isodoc/csa/html_convert.rb
302
302
  - lib/isodoc/csa/metadata.rb
303
303
  - lib/isodoc/csa/pdf_convert.rb
304
+ - lib/isodoc/csa/presentation_xml_convert.rb
304
305
  - lib/isodoc/csa/word_convert.rb
305
306
  - lib/metanorma-csa.rb
306
307
  - lib/metanorma/csa.rb
@@ -311,7 +312,7 @@ homepage: https://github.com/metanorma/metanorma-csa
311
312
  licenses:
312
313
  - BSD-2-Clause
313
314
  metadata: {}
314
- post_install_message:
315
+ post_install_message:
315
316
  rdoc_options: []
316
317
  require_paths:
317
318
  - lib
@@ -326,9 +327,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
326
327
  - !ruby/object:Gem::Version
327
328
  version: '0'
328
329
  requirements: []
329
- rubyforge_project:
330
- rubygems_version: 2.7.6
331
- signing_key:
330
+ rubygems_version: 3.0.3
331
+ signing_key:
332
332
  specification_version: 4
333
333
  summary: metanorma-csa lets you write CSA Normal Documents (CSAND) in AsciiDoc.
334
334
  test_files: []