Class: DocverterServer::Runner::Pandoc

Inherits:
Base
  • Object
show all
Defined in:
lib/docverter-server/runner/pandoc.rb

Instance Attribute Summary

Attributes inherited from Base

#directory, #input_filename, #options

Instance Method Summary collapse

Methods inherited from Base

#generate_output_filename, #initialize, #run_command, #with_manifest

Constructor Details

This class inherits a constructor from DocverterServer::Runner::Base

Instance Method Details

#runObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/docverter-server/runner/pandoc.rb', line 5

def run
  with_manifest do |manifest|
    options = manifest.command_options
    
    extension = DocverterServer::ConversionTypes.extension(manifest['to'])
    output = generate_output_filename(extension)

    options = ['pandoc', '--standalone', "--output=#{output}"] + options
    run_command(options)
    output
  end
end