Sha256: 9d68240b8dd41ec4bd8bb5f6cafce453ac948a472eec093f4255aa72b72ed8e5

Contents?: true

Size: 1.53 KB

Versions: 24

Compression:

Stored size: 1.53 KB

Contents

require "metanorma/processor"

module Metanorma
  module Ogc
    class Processor < Metanorma::Processor

      def initialize # rubocop:disable Lint/MissingSuper
        @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={})
        options_preprocess(options)
        case format
        when :html then IsoDoc::Ogc::HtmlConvert.new(options)
          .convert(inname, isodoc_node, nil, outname)
        when :doc then IsoDoc::Ogc::WordConvert.new(options)
          .convert(inname, isodoc_node, nil, outname)
        when :pdf then IsoDoc::Ogc::PdfConvert.new(options)
          .convert(inname, isodoc_node, nil, outname)
        when :presentation then IsoDoc::Ogc::PresentationXMLConvert.new(options)
          .convert(inname, isodoc_node, nil, outname)
        else
          super
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
metanorma-ogc-2.6.6 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.6.5 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.6.4 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.6.3 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.6.2 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.6.1 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.6.0 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.14 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.13 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.12 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.10 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.9 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.8 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.7 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.6 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.5 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.4 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.3 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.2 lib/metanorma/ogc/processor.rb
metanorma-ogc-2.5.1 lib/metanorma/ogc/processor.rb