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
24 25 26 |
# File 'lib/metanorma/standoc/processor.rb', line 24 def html_path(file) File.join(File.dirname(__FILE__), "..", "..", "isodoc", "html", file) end |
#output(isodoc_node, inname, outname, format, options = {}) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/metanorma/standoc/processor.rb', line 28 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 :pdf IsoDoc::Standoc::PdfConvert.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 18 |
# File 'lib/metanorma/standoc/processor.rb', line 12 def output_formats super.merge( html: "html", doc: "doc", pdf: "pdf", ) end |