Sha256: 46aea1791bd5c16dfedc62f0a0903394e1405996f1e3fa9507a9564dfeb2a644

Contents?: true

Size: 1.38 KB

Versions: 2

Compression:

Stored size: 1.38 KB

Contents

# Copyright (C) 2015-2018 Sascha Manns <Sascha.Manns@outlook.de>
#
# 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 <http://www.gnu.org/licenses/>.

# 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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
latex_curriculum_vitae-2.1.3 lib/latex_curriculum_vitae/letter.rb
latex_curriculum_vitae-2.1.2 lib/latex_curriculum_vitae/letter.rb