Module: LatexCurriculumVitae::CV
- Defined in:
- lib/latex_curriculum_vitae/cv.rb
Overview
Module for creating the CV
Class Method Summary collapse
-
.appendix(name_of_pdf) ⇒ Object
Add additional stuff.
-
.copy_home(name_of_pdf, data_dir) ⇒ Object
Copy result to .latex_curriculum_vitae.
-
.create_cv(name_of_resume, tmp_dir) ⇒ Object
Create Curriculum Vitae method TODO: Try to fix this in future rubocop:disable Metrics/AbcSize.
-
.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover) ⇒ Object
Create the final cv TODO: Try to fix this in future This method smells of :reek:LongParameterList This method smells of :reek:ControlParameter.
Class Method Details
.appendix(name_of_pdf) ⇒ Object
Add additional stuff
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/latex_curriculum_vitae/cv.rb', line 77 def self.appendix(name_of_pdf) puts 'Adding additional stuff'.color(:yellow) pdf = CombinePDF.new pdf << CombinePDF.load('result.pdf') # Put there your own stuff pdf << CombinePDF.load('../Appendix/Employers_Reference/xcom.pdf') pdf << CombinePDF.load('../Appendix/Employers_Reference/hays.pdf') pdf << CombinePDF.load('../Appendix/Certificates/thm-webeng1.pdf') pdf << CombinePDF.load('../Appendix/Certificates/kompetenzpass12013.pdf') pdf << CombinePDF.load('../Appendix/Employers_Reference/openslx.pdf') pdf << CombinePDF.load('../Appendix/Employers_Reference/openslx1.pdf') pdf << CombinePDF.load('../Appendix/Certificates/Zertifikat_Sascha_Manns1.pdf') pdf << CombinePDF.load('../Appendix/First_References/ihk.pdf') pdf.save "#{name_of_pdf}.pdf" puts 'Additional stuff done'.color(:green) end |
.copy_home(name_of_pdf, data_dir) ⇒ Object
Copy result to .latex_curriculum_vitae
97 98 99 100 101 |
# File 'lib/latex_curriculum_vitae/cv.rb', line 97 def self.copy_home(name_of_pdf, data_dir) puts "Copying #{name_of_pdf}.pdf to tmpdir".color(:yellow) system("cp #{name_of_pdf}.pdf #{data_dir}") puts 'Copied to tmpdir'.color(:green) end |
.create_cv(name_of_resume, tmp_dir) ⇒ Object
Create Curriculum Vitae method TODO: Try to fix this in future rubocop:disable Metrics/AbcSize
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/latex_curriculum_vitae/cv.rb', line 31 def self.create_cv(name_of_resume, tmp_dir) puts 'First run of xelatex'.color(:yellow) system("xelatex #{name_of_resume}.tex") puts 'First run of xelatex passed'.color(:yellow) puts 'Running biber'.color(:yellow) system("biber #{name_of_resume}.bcf") puts 'Run of biber passed'.color(:yellow) puts 'Second run of xelatex'.color(:yellow) system("xelatex #{name_of_resume}.tex") puts 'Second run of xelatex passed'.color(:yellow) puts 'All done'.color(:green) system("cp #{name_of_resume}.pdf #{tmp_dir}/#{name_of_resume}.pdf") end |
.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover) ⇒ Object
Create the final cv TODO: Try to fix this in future This method smells of :reek:LongParameterList This method smells of :reek:ControlParameter
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/latex_curriculum_vitae/cv.rb', line 54 def self.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover) if letter == 'yes' puts 'Merging the motivational letter with the cv'.color(:yellow) pdf = CombinePDF.new pdf << CombinePDF.load("#{name_of_letter}.pdf") pdf << CombinePDF.load("#{name_of_cover}.pdf") pdf << CombinePDF.load("#{name_of_resume}.pdf") pdf.save 'result.pdf' puts 'Merging done'.color(:green) else puts "Copying #{name_of_resume}.pdf result.pdf".color(:green) pdf = CombinePDF.new pdf << CombinePDF.load("#{name_of_cover}.pdf") pdf << CombinePDF.load("#{name_of_resume}.pdf") pdf.save 'resumenew.pdf' system('cp resumenew.pdf result.pdf') puts 'Done'.color(:green) end appendix(name_of_pdf) end |