# Copyright (C) 2015-2017 Sascha Manns # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Dependencies require 'fileutils' require 'rainbow/ext/string' # main module module LatexCurriculumVitae # Module for creating the motivational letter module Letter # Method for creating a pdf from tex # @param [String] tmp_dir Name of the Tempdir # @param [String] name_of_letter Filename of the Letter 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 end end