metanorma-iso 1.5.6 → 1.5.7

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: af5b522de99b45f3bfe7f85160164adef26c76fd3422589d47309fa9e45086b3
4
- data.tar.gz: 99305967e4efd098f560a968e290ed45f687841f3246995b73e472a1776e29be
3
+ metadata.gz: e4e243a2452352cf57ead226a133917dfd0cd0d7f618109e07355777ac10354b
4
+ data.tar.gz: d7a8f18735dce09f5fdb1f8be436b7314f265a508ca5c4e878e1ae6c28f4df39
5
5
  SHA512:
6
- metadata.gz: 277da3d65b6fb4b0de530d152ef7c3f02cdd8aca331f8b0b8d201fd9ce99c245f80556ad9f5465d7aba7a47b0cfba3823ce98b6afb11dd8df2ef3ced774c2232
7
- data.tar.gz: 767a3e807f6f26548c1535e297063a73c9b04e45c62b9f7c97929c4bde1917b33027b05a50625ee45b5fb9983f40d9e6337016978db94319bd2ce9f834c28860
6
+ metadata.gz: fa1a2af192f51f4cda4a52b85b8a83aec9656fe36f890fd4e322d13e9d8db4587be47bbbb0b56b1680af139a1c3582d3a0304160517f5c582fb2f937791fa621
7
+ data.tar.gz: ba1a5714584f972567677d83ca2ffc7326b3f86319e9cc4bdfd458ed1d5fa6e09bf4fa0b175c9c0c035537a9d9d1090e3c5f6cbaeb70bd963b055f9da18ff872
@@ -0,0 +1,31 @@
1
+ require "isodoc"
2
+ require "mn2sts"
3
+
4
+ module IsoDoc
5
+ module Iso
6
+
7
+ # A {Converter} implementation that generates HTML output, and a document
8
+ # schema encapsulation of the document for validation
9
+ #
10
+ class IsoStsConvert < IsoDoc::XslfoPdfConvert
11
+ def initialize(options)
12
+ @libdir = File.dirname(__FILE__)
13
+ @format = :isosts
14
+ @suffix = "isosts.xml"
15
+ end
16
+
17
+ def convert(input_filename, file = nil, debug = false, output_filename = nil)
18
+ file = File.read(input_filename, encoding: "utf-8") if file.nil?
19
+ docxml, filename, dir = convert_init(file, input_filename, debug)
20
+ /\.xml$/.match(input_filename) or
21
+ input_filename = Tempfile.open([filename, ".xml"], encoding: "utf-8") do |f|
22
+ f.write file
23
+ f.path
24
+ end
25
+ FileUtils.rm_rf dir
26
+ Mn2sts.convert(input_filename, output_filename || "#{filename}.#{@suffix}", iso: true)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.5.6".freeze
3
+ VERSION = "1.5.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -327,6 +327,7 @@ files:
327
327
  - lib/isodoc/iso/init.rb
328
328
  - lib/isodoc/iso/iso.amendment.xsl
329
329
  - lib/isodoc/iso/iso.international-standard.xsl
330
+ - lib/isodoc/iso/isosts_convert.rb
330
331
  - lib/isodoc/iso/metadata.rb
331
332
  - lib/isodoc/iso/pdf_convert.rb
332
333
  - lib/isodoc/iso/presentation_xml_convert.rb