Sha256: 9875b4131a1834b0b06d25bf29b4369988d5d16795a4b427edefd23572f583bb

Contents?: true

Size: 1.43 KB

Versions: 19

Compression:

Stored size: 1.43 KB

Contents

require "metanorma/processor"

module Metanorma
  module Ogc
    class Processor < Metanorma::Processor

      def initialize
        @short = :ogc
        @input_format = :asciidoc
        @asciidoctor_backend = :ogc
      end

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


      def fonts_manifest
        {
          "Lato" => nil,
          "Lato Light" => nil,
          "Arial" => nil,
          "STIX Two Math" => nil,
          "Source Han Sans" => nil,
          "Source Han Sans Normal" => nil,
          "Fira Code" => nil,
          "Courier New" => nil,
          "Times New Roman" => nil,
          "Overpass" => nil,
          "Space Mono" => nil,
        }
      end

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

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
metanorma-ogc-2.0.4 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.0.3 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.0.2 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.0.1 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.0.0 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.5.5 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.5.4.1 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.5.4 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.5.3 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.5.2 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.5.1 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.5.0 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.4.5 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.4.4 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.4.3.1 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.4.3 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.4.2 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.4.1 lib/metanorma/ogc/processor.rb
metanorma-ogc-1.4.0 lib/metanorma/ogc/processor.rb