Class: Metanorma::Standoc::Processor
- Inherits:
-
Processor
- Object
- Processor
- Metanorma::Standoc::Processor
- Defined in:
- lib/metanorma/standoc/processor.rb
Instance Method Summary collapse
- #html_path(file) ⇒ Object
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
- #output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
- #output_formats ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
6 7 8 9 10 |
# File 'lib/metanorma/standoc/processor.rb', line 6 def initialize # rubocop:disable Lint/MissingSuper @short = :standoc @input_format = :asciidoc @asciidoctor_backend = :standoc end |
Instance Method Details
#html_path(file) ⇒ Object
23 24 25 |
# File 'lib/metanorma/standoc/processor.rb', line 23 def html_path(file) File.join(File.dirname(__FILE__), "..", "..", "isodoc", "html", file) end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/metanorma/standoc/processor.rb', line 27 def output(isodoc_node, inname, outname, format, = {}) case format when :html = .merge(htmlstylesheet: html_path("htmlstyle.scss"), htmlcoverpage: html_path("html_titlepage.html")) IsoDoc::HtmlConvert.new() .convert(inname, isodoc_node, nil, outname) when :doc IsoDoc::WordConvert.new() .convert(inname, isodoc_node, nil, outname) when :presentation IsoDoc::PresentationXMLConvert.new() .convert(inname, isodoc_node, nil, outname) else super end end |
#output_formats ⇒ Object
12 13 14 15 16 17 |
# File 'lib/metanorma/standoc/processor.rb', line 12 def output_formats super.merge( html: "html", doc: "doc", ) end |
#version ⇒ Object
19 20 21 |
# File 'lib/metanorma/standoc/processor.rb', line 19 def version "Metanorma::Standoc #{Metanorma::Standoc::VERSION}/IsoDoc #{IsoDoc::VERSION}" end |