Sha256: 66c86d589d73388e1397c659a3d890587473584ad3df836a5627b69bf3df0f82
Contents?: true
Size: 818 Bytes
Versions: 2
Compression:
Stored size: 818 Bytes
Contents
require "isodoc" require "mn2sts" module IsoDoc module Iso # A {Converter} implementation that generates HTML output, and a document # schema encapsulation of the document for validation # class StsConvert < IsoDoc::XslfoPdfConvert def initialize(options) @libdir = File.dirname(__FILE__) end def convert(filename, file = nil, debug = false) file = File.read(filename, encoding: "utf-8") if file.nil? docxml, outname_html, dir = convert_init(file, filename, debug) /\.xml$/.match(filename) or filename = Tempfile.open([outname_html, ".xml"], encoding: "utf-8") do |f| f.write file f.path end FileUtils.rm_rf dir Mn2sts.convert(filename, outname_html + ".sts.xml") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
metanorma-iso-1.3.27 | lib/isodoc/iso/sts_convert.rb |
metanorma-iso-1.3.26 | lib/isodoc/iso/sts_convert.rb |