Sha256: 116f864242eb641d9410061df950a8974168d5ce654299378b496e35e5f0959c

Contents?: true

Size: 1.3 KB

Versions: 16

Compression:

Stored size: 1.3 KB

Contents

require "metanorma/processor"

module Metanorma
  module IHO
    def self.fonts_used
      {
        html: ["SourceSansPro-Light", "SourceSerifPro", "SourceCodePro-Light", "HanSans"],
        doc: ["SourceSansPro-Light", "SourceSerifPro", "SourceCodePro-Light", "HanSans"],
        pdf: ["SourceSansPro-Light", "SourceSerifPro", "SourceCodePro-Light", "HanSans"],
      }
    end

    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={})
        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

16 entries across 13 versions & 2 rubygems

Version Path
metanorma-iho-0.2.7 lib/metanorma/iho/processor.rb
metanorma-iho-0.2.6 lib/metanorma/iho/processor.rb
metanorma-iho-0.2.5 lib/metanorma/iho/processor.rb
metanorma-iho-0.2.4 lib/metanorma/iho/processor.rb
metanorma-iho-0.2.3 lib/metanorma/iho/processor.rb
metanorma-iho-0.2.2 lib/metanorma/iho/processor.rb
metanorma-iho-0.2.1 lib/metanorma/iho/processor.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iho-0.2.0/lib/metanorma/iho/processor.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iho-0.1.2/lib/metanorma/iho/processor.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/metanorma-iho-0.1.1/lib/metanorma/iho/processor.rb
metanorma-iho-0.2.0 lib/metanorma/iho/processor.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-iho-0.1.1/lib/metanorma/iho/processor.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/metanorma-iho-0.1.2/lib/metanorma/iho/processor.rb
metanorma-iho-0.1.2 lib/metanorma/iho/processor.rb
metanorma-iho-0.1.1 lib/metanorma/iho/processor.rb
metanorma-iho-0.1.0 lib/metanorma/iho/processor.rb