Class: Ffnpdf::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/ffnpdf/converter.rb

Class Method Summary collapse

Class Method Details

.convert_to_pdf(story_id) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/ffnpdf/converter.rb', line 7

def self.convert_to_pdf(story_id)
  Dir.chdir story_id
  
  command = "markdown2pdf --xetex --template=xetex.template --toc #{IO.readlines("variables.txt")[0].strip} combined.md"
  Converter.exec(command)

  Dir.chdir "../" 
end

.exec(command) ⇒ Object



3
4
5
# File 'lib/ffnpdf/converter.rb', line 3

def self.exec(command)
  `#{command}`
end