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 +4 -4
- data/lib/isodoc/iso/isosts_convert.rb +31 -0
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4e243a2452352cf57ead226a133917dfd0cd0d7f618109e07355777ac10354b
|
4
|
+
data.tar.gz: d7a8f18735dce09f5fdb1f8be436b7314f265a508ca5c4e878e1ae6c28f4df39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
|
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.
|
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
|