Sha256: 338317a6094973b3b2b9cedf34704faf51c38187ce74c2ce512c5212327bc665

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

require "metanorma/processor"

module Metanorma
  module Iho
    class Processor < Metanorma::Generic::Processor
      def configuration
        Metanorma::Iho.configuration
      end

      def output_formats
        super.merge(
          html: "html",
          doc: "doc",
          pdf: "pdf",
        )
      end

      def version
        "Metanorma::Iho #{Metanorma::Iho::VERSION}"
      end

      def output(isodoc_node, inname, outname, format, options={})
        options_preprocess(options)
        case format
        when :html
          IsoDoc::Iho::HtmlConvert.new(options).convert(inname, isodoc_node, nil, outname)
        when :doc
          IsoDoc::Iho::WordConvert.new(options).convert(inname, isodoc_node, nil, outname)
        when :pdf
          IsoDoc::Iho::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname)
        when :presentation
          IsoDoc::Iho::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
        else
          super
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
metanorma-iho-1.0.8 lib/metanorma/iho/processor.rb
metanorma-iho-1.0.7 lib/metanorma/iho/processor.rb
metanorma-iho-1.0.6 lib/metanorma/iho/processor.rb
metanorma-iho-1.0.5 lib/metanorma/iho/processor.rb