module LatexCurriculumVitae::Letter

Module for creating the motivational letter

Public Class Methods

create_letter(tmp_dir, name_of_letter) click to toggle source

Method for creating a pdf from tex @param [String] tmp_dir Name of the Tempdir @param [String] name_of_letter Filename of the Letter

# File lib/latex_curriculum_vitae/letter.rb, line 27
def self.create_letter(tmp_dir, name_of_letter)
  puts 'Compiling motivational letter'.color(:yellow)
  system("pdflatex #{name_of_letter}.tex")
  puts 'Done compiling motivational letter'.color(:green)
  system("cp #{name_of_letter}.pdf #{tmp_dir}")
  puts 'Copied motivational letter to tmpdir'.color(:green)
end