latex_curriculum_vitae 2.1.4 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +1,13 @@
1
- mktextfm HelveticaNeueLTPro-UltLt
2
- mktextfm HelveticaNeueLTPro-UltLt
3
- mktextfm HelveticaNeueLTPro-UltLt
4
- mktextfm HelveticaNeueLTPro-UltLt/BI
5
- mktextfm HelveticaNeueLTPro-UltLt
6
- mktextfm HelveticaNeueLTPro-UltLt/B
7
- mktextfm HelveticaNeueLTPro-UltLt
8
- mktextfm HelveticaNeueLTPro-UltLt/I
9
- mktextfm HelveticaNeueLTPro-UltLt
10
- mktextfm HelveticaNeueLTPro-UltLt
11
- mktextfm HelveticaNeueLTPro-UltLt
12
- mktextfm HelveticaNeueLTPro-UltLt
13
- mktextfm HelveticaNeueLTPro-UltLt/BI
1
+ mktextfm HelveticaNeueLTPro-UltLt
2
+ mktextfm HelveticaNeueLTPro-UltLt
3
+ mktextfm HelveticaNeueLTPro-UltLt
4
+ mktextfm HelveticaNeueLTPro-UltLt/BI
5
+ mktextfm HelveticaNeueLTPro-UltLt
6
+ mktextfm HelveticaNeueLTPro-UltLt/B
7
+ mktextfm HelveticaNeueLTPro-UltLt
8
+ mktextfm HelveticaNeueLTPro-UltLt/I
9
+ mktextfm HelveticaNeueLTPro-UltLt
10
+ mktextfm HelveticaNeueLTPro-UltLt
11
+ mktextfm HelveticaNeueLTPro-UltLt
12
+ mktextfm HelveticaNeueLTPro-UltLt
13
+ mktextfm HelveticaNeueLTPro-UltLt/BI
@@ -1,16 +1,16 @@
1
- # Read the documentation at: https://saschamanns.de/doc-lcv
2
- name_of_pdf = "Bewerbungsunterlagen_Manns"
3
- name_of_cover = "Cover"
4
- name_of_resume = "cv_10"
5
- name_of_letter = "bwanschreiben"
6
- mail_backend = "Pony" # Pony or Evolution
7
- own_name = "Sascha Manns"
8
- own_email_address = "Sascha.Manns@outlook.de"
9
- own_smtp = "smtp.my.com"
10
- own_port = "587"
11
- own_username = "myusername"
12
- own_password = "mypassword"
13
- pdf_reader = "/home/sascha/FoxitSoftware/FoxitReader/FoxitReader.sh"
14
- shorten_url = "no" # currently it doesn't work
15
- bitly_user = "test"
1
+ # Read the documentation at: https://saschamanns.de/doc-lcv
2
+ name_of_pdf = "Bewerbungsunterlagen_Manns"
3
+ name_of_cover = "Cover"
4
+ name_of_resume = "cv_10"
5
+ name_of_letter = "bwanschreiben"
6
+ mail_backend = "Pony" # Pony or Evolution
7
+ own_name = "Sascha Manns"
8
+ own_email_address = "Sascha.Manns@outlook.de"
9
+ own_smtp = "smtp.my.com"
10
+ own_port = "587"
11
+ own_username = "myusername"
12
+ own_password = "mypassword"
13
+ pdf_reader = "/home/sascha/FoxitSoftware/FoxitReader/FoxitReader.sh"
14
+ shorten_url = "no" # currently it doesn't work
15
+ bitly_user = "test"
16
16
  bitly_apikey = "0815"
@@ -1,11 +1,11 @@
1
- % Read the documentation at: https://saschamanns.de/doc-lcv
2
- \def\firstname{Sascha}
3
- \def\familyname{Manns}
4
- \def\mystreet{Maifeldstraße 10}
5
- \def\mycity{56727 Mayen}
6
- \def\myphone{+49-1573-924~27~30}
7
- \def\myemail{Sascha.Manns@outlook.de}
8
- \def\myblog{http://saschamanns.de}
9
- \def\mybank{Kto. DE88\ 5765\ 0010\ 0198\ 2426\ 20 \\
10
- BIC: MALADE51MYN \\
1
+ % Read the documentation at: https://saschamanns.de/doc-lcv
2
+ \def\firstname{Sascha}
3
+ \def\familyname{Manns}
4
+ \def\mystreet{Maifeldstraße 10}
5
+ \def\mycity{56727 Mayen}
6
+ \def\myphone{+49-1573-924~27~30}
7
+ \def\myemail{Sascha.Manns@outlook.de}
8
+ \def\myblog{http://saschamanns.de}
9
+ \def\mybank{Kto. DE88\ 5765\ 0010\ 0198\ 2426\ 20 \\
10
+ BIC: MALADE51MYN \\
11
11
  Kreissparkasse Mayen}
@@ -1,110 +1,111 @@
1
- # Copyright (C) 2015-2019 Sascha Manns <Sascha.Manns@outlook.de>
2
- #
3
- # This program is free software: you can redistribute it and/or modify
4
- # it under the terms of the GNU General Public License as published by
5
- # the Free Software Foundation, either version 3 of the License, or
6
- # (at your option) any later version.
7
- #
8
- # This program is distributed in the hope that it will be useful,
9
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- # GNU General Public License for more details.
12
- #
13
- # You should have received a copy of the GNU General Public License
14
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
-
16
- # Dependencies
17
- require 'fileutils'
18
- require 'xdg'
19
- require 'tmpdir'
20
-
21
- require_relative 'latex_curriculum_vitae/entityfile'
22
- require_relative 'latex_curriculum_vitae/cv'
23
- require_relative 'latex_curriculum_vitae/cover'
24
- require_relative 'latex_curriculum_vitae/email'
25
- require_relative 'latex_curriculum_vitae/outfile'
26
- require_relative 'latex_curriculum_vitae/notifier'
27
- require_relative 'latex_curriculum_vitae/letter'
28
- require_relative 'latex_curriculum_vitae/get-config'
29
-
30
- # Main Class LatexCurriculumVitae
31
- module LatexCurriculumVitae
32
-
33
- # Variables
34
- sys_xdg = XDG['CONFIG_HOME']
35
- data_xdg = XDG['DATA_HOME']
36
- sysconf_dir = "#{sys_xdg}/latex_curriculum_vitae"
37
- data_dir = "#{data_xdg}/latex_curriculum_vitae"
38
- entity_tex = "#{sysconf_dir}/entity.tex"
39
- csv_out = "#{sysconf_dir}/job-applications.csv"
40
- temp_dir = '/tmp/latex_curriculum_vitae'
41
- tmp_dir = "#{temp_dir}/build"
42
-
43
- name_of_pdf, name_of_cover, name_of_resume, name_of_letter, pdf_reader, shorten_url, bit_ly_user, bit_ly_apikey,
44
- mail_backend = LatexCurriculumVitae::GetConfig.get(sysconf_dir)
45
-
46
- # Get the needed Information for creating the application
47
- contact, email_address, job_title, contact_sex, company, letter,
48
- proactive, job_url, target = LatexCurriculumVitae::Entityfile.get_information(entity_tex)
49
-
50
- # Shorten shorten_url
51
- # TODO: Try to fix this in future
52
- # rubocop:disable Style/IfInsideElse
53
- if proactive == 'yes'
54
- job_url_checked = 'No URL available (Proactive)'
55
- else
56
- if shorten_url == 'yes'
57
- if job_url != ''
58
- job_url_checked = LatexCurriculumVitae::Entityfile.shorten_url(job_url, bit_ly_user,
59
- bit_ly_apikey)
60
- else
61
- puts 'No url given'
62
- end
63
- else
64
- job_url_checked = job_url
65
- end
66
- end
67
-
68
- # Remove old tempdir and copy data to tempdir
69
- FileUtils.rm_rf(temp_dir) if File.exist?("#{temp_dir}/Resume/cv_10.tex")
70
- FileUtils.mkdir(temp_dir)
71
- FileUtils.mkdir(tmp_dir)
72
- FileUtils.cp_r("#{data_dir}/.", temp_dir)
73
-
74
- # Create Motivational Letter
75
- if letter == 'yes'
76
- FileUtils.cd("#{temp_dir}/Motivational_Letter") do
77
- LatexCurriculumVitae::Letter.create_letter(tmp_dir, name_of_letter)
78
- end
79
- end
80
-
81
- # Create the cover
82
- FileUtils.cd("#{temp_dir}/Cover") do
83
- LatexCurriculumVitae::Cover.create_cover(name_of_cover, tmp_dir)
84
- end
85
-
86
- # Create the Curriculum Vitae
87
- FileUtils.cd("#{temp_dir}/Resume") do
88
- LatexCurriculumVitae::CV.create_cv(name_of_resume, tmp_dir)
89
- end
90
-
91
- # Final create and shrinking
92
- FileUtils.cd(tmp_dir) do
93
- LatexCurriculumVitae::CV.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover)
94
- LatexCurriculumVitae::CV.copy_home(name_of_pdf, data_dir)
95
- end
96
-
97
- # Add entry to Outfile
98
- CVOutfile.add_to_outfile(job_title, company, contact, email_address, csv_out,
99
- job_url_checked)
100
-
101
- # Start evince to check the output file
102
- system("#{pdf_reader} #{data_dir}/#{name_of_pdf}.pdf")
103
-
104
- # Ask if result is ok
105
- LatexCurriculumVitae::Email.result_ok(contact, email_address, job_title, contact_sex, proactive,
106
- letter, name_of_pdf, sysconf_dir, data_dir, mail_backend, target)
107
-
108
- # Inform about creation is done
109
- LatexCurriculumVitae::Notify.run(job_title, data_dir)
110
- end
1
+ # Copyright (C) 2015-2020 Sascha Manns <Sascha.Manns@outlook.de>
2
+ #
3
+ # This program is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ # Dependencies
17
+ require 'fileutils'
18
+ require 'xdg'
19
+ require 'tmpdir'
20
+
21
+ require_relative 'latex_curriculum_vitae/entityfile'
22
+ require_relative 'latex_curriculum_vitae/cv'
23
+ require_relative 'latex_curriculum_vitae/cover'
24
+ require_relative 'latex_curriculum_vitae/email'
25
+ require_relative 'latex_curriculum_vitae/outfile'
26
+ require_relative 'latex_curriculum_vitae/notifier'
27
+ require_relative 'latex_curriculum_vitae/letter'
28
+ require_relative 'latex_curriculum_vitae/get-config'
29
+
30
+ # Main Class LatexCurriculumVitae
31
+ module LatexCurriculumVitae
32
+
33
+ # Variables
34
+ xdg = XDG::Environment.new
35
+ sys_xdg = xdg.config_home
36
+ data_xdg = xdg.data_home
37
+ sysconf_dir = "#{sys_xdg}/latex_curriculum_vitae"
38
+ data_dir = "#{data_xdg}/latex_curriculum_vitae"
39
+ entity_tex = "#{sysconf_dir}/entity.tex"
40
+ csv_out = "#{sysconf_dir}/job-applications.csv"
41
+ temp_dir = '/tmp/latex_curriculum_vitae'
42
+ tmp_dir = "#{temp_dir}/build"
43
+
44
+ name_of_pdf, name_of_cover, name_of_resume, name_of_letter, pdf_reader, shorten_url, bit_ly_user, bit_ly_apikey,
45
+ mail_backend = LatexCurriculumVitae::GetConfig.get(sysconf_dir)
46
+
47
+ # Get the needed Information for creating the application
48
+ contact, email_address, job_title, contact_sex, company, letter,
49
+ proactive, job_url, target = LatexCurriculumVitae::Entityfile.get_information(entity_tex)
50
+
51
+ # Shorten shorten_url
52
+ # TODO: Try to fix this in future
53
+ # rubocop:disable Style/IfInsideElse
54
+ if proactive == 'yes'
55
+ job_url_checked = 'No URL available (Proactive)'
56
+ else
57
+ if shorten_url == 'yes'
58
+ if job_url != ''
59
+ job_url_checked = LatexCurriculumVitae::Entityfile.shorten_url(job_url, bit_ly_user,
60
+ bit_ly_apikey)
61
+ else
62
+ puts 'No url given'
63
+ end
64
+ else
65
+ job_url_checked = job_url
66
+ end
67
+ end
68
+
69
+ # Remove old tempdir and copy data to tempdir
70
+ FileUtils.rm_rf(temp_dir) if File.exist?("#{temp_dir}/Resume/cv_10.tex")
71
+ FileUtils.mkdir(temp_dir)
72
+ FileUtils.mkdir(tmp_dir)
73
+ FileUtils.cp_r("#{data_dir}/.", temp_dir)
74
+
75
+ # Create Motivational Letter
76
+ if letter == 'yes'
77
+ FileUtils.cd("#{temp_dir}/Motivational_Letter") do
78
+ LatexCurriculumVitae::Letter.create_letter(tmp_dir, name_of_letter)
79
+ end
80
+ end
81
+
82
+ # Create the cover
83
+ FileUtils.cd("#{temp_dir}/Cover") do
84
+ LatexCurriculumVitae::Cover.create_cover(name_of_cover, tmp_dir)
85
+ end
86
+
87
+ # Create the Curriculum Vitae
88
+ FileUtils.cd("#{temp_dir}/Resume") do
89
+ LatexCurriculumVitae::CV.create_cv(name_of_resume, tmp_dir)
90
+ end
91
+
92
+ # Final create and shrinking
93
+ FileUtils.cd(tmp_dir) do
94
+ LatexCurriculumVitae::CV.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover)
95
+ LatexCurriculumVitae::CV.copy_home(name_of_pdf, data_dir)
96
+ end
97
+
98
+ # Add entry to Outfile
99
+ CVOutfile.add_to_outfile(job_title, company, contact, email_address, csv_out,
100
+ job_url_checked)
101
+
102
+ # Start evince to check the output file
103
+ system("#{pdf_reader} #{data_dir}/#{name_of_pdf}.pdf")
104
+
105
+ # Ask if result is ok
106
+ LatexCurriculumVitae::Email.result_ok(contact, email_address, job_title, contact_sex, proactive,
107
+ letter, name_of_pdf, sysconf_dir, data_dir, mail_backend, target)
108
+
109
+ # Inform about creation is done
110
+ LatexCurriculumVitae::Notify.run(job_title, data_dir)
111
+ end
@@ -1,32 +1,32 @@
1
- # Copyright (C) 2015-2019 Sascha Manns <Sascha.Manns@outlook.de>
2
- #
3
- # This program is free software: you can redistribute it and/or modify
4
- # it under the terms of the GNU General Public License as published by
5
- # the Free Software Foundation, either version 3 of the License, or
6
- # (at your option) any later version.
7
- #
8
- # This program is distributed in the hope that it will be useful,
9
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- # GNU General Public License for more details.
12
- #
13
- # You should have received a copy of the GNU General Public License
14
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
-
16
- # Dependencies
17
- require 'rainbow/ext/string'
18
-
19
- # main module
20
- module LatexCurriculumVitae
21
- # Cover module
22
- module Cover
23
- # Create cover method
24
- # @param [String] name_of_cover Name of the cover file
25
- def self.create_cover(name_of_cover, tmp_dir)
26
- puts 'Creating cover'.color(:yellow)
27
- system("pdflatex #{name_of_cover}.tex")
28
- system("cp #{name_of_cover}.pdf #{tmp_dir}/#{name_of_cover}.pdf")
29
- puts 'Creating cover done'.color(:green)
30
- end
31
- end
32
- end
1
+ # Copyright (C) 2015-2020 Sascha Manns <Sascha.Manns@outlook.de>
2
+ #
3
+ # This program is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ # Dependencies
17
+ require 'rainbow/ext/string'
18
+
19
+ # main module
20
+ module LatexCurriculumVitae
21
+ # Cover module
22
+ module Cover
23
+ # Create cover method
24
+ # @param [String] name_of_cover Name of the cover file
25
+ def self.create_cover(name_of_cover, tmp_dir)
26
+ puts 'Creating cover'.color(:yellow)
27
+ system("pdflatex #{name_of_cover}.tex")
28
+ system("cp #{name_of_cover}.pdf #{tmp_dir}/#{name_of_cover}.pdf")
29
+ puts 'Creating cover done'.color(:green)
30
+ end
31
+ end
32
+ end
@@ -1,103 +1,103 @@
1
- # Copyright (C) 2015-2019 Sascha Manns <Sascha.Manns@outlook.de>
2
- #
3
- # This program is free software: you can redistribute it and/or modify
4
- # it under the terms of the GNU General Public License as published by
5
- # the Free Software Foundation, either version 3 of the License, or
6
- # (at your option) any later version.
7
- #
8
- # This program is distributed in the hope that it will be useful,
9
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- # GNU General Public License for more details.
12
- #
13
- # You should have received a copy of the GNU General Public License
14
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
-
16
- # Dependencies
17
- require 'rainbow/ext/string'
18
- require 'combine_pdf'
19
- require 'fileutils'
20
-
21
- # main Module
22
- module LatexCurriculumVitae
23
- # Module for creating the CV
24
- module CV
25
- # Create Curriculum Vitae method
26
- # TODO: Try to fix this in future
27
- # rubocop:disable Metrics/AbcSize
28
- # @param [String] name_of_pdf Name of the resulting PDF file
29
- # @param [String] name_of_resume Name of the resume file
30
- # @param [String] tmp_dir contains the path to the
31
- def self.create_cv(name_of_resume, tmp_dir)
32
- puts 'First run of xelatex'.color(:yellow)
33
- system("xelatex #{name_of_resume}.tex")
34
- puts 'First run of xelatex passed'.color(:yellow)
35
- puts 'Running biber'.color(:yellow)
36
- system("biber #{name_of_resume}.bcf")
37
- puts 'Run of biber passed'.color(:yellow)
38
- puts 'Second run of xelatex'.color(:yellow)
39
- system("xelatex #{name_of_resume}.tex")
40
- puts 'Second run of xelatex passed'.color(:yellow)
41
- puts 'All done'.color(:green)
42
- system("cp #{name_of_resume}.pdf #{tmp_dir}/#{name_of_resume}.pdf")
43
- end
44
-
45
- # Create the final cv
46
- # @param [String] letter With motivational letter? Can be yes or no
47
- # @param [String] name_of_letter Name of the motivational letter file
48
- # @param [String] name_of_resume Name of the resume file
49
- # @param [String] name_of_pdf Name of the finished pdf
50
- # @param [String] name_of_cover Name of the Cover file
51
- # TODO: Try to fix this in future
52
- # This method smells of :reek:LongParameterList
53
- # This method smells of :reek:ControlParameter
54
- def self.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover)
55
- if letter == 'yes'
56
- puts 'Merging the motivational letter with the cv'.color(:yellow)
57
- pdf = CombinePDF.new
58
- pdf << CombinePDF.load("#{name_of_letter}.pdf")
59
- pdf << CombinePDF.load("#{name_of_cover}.pdf")
60
- pdf << CombinePDF.load("#{name_of_resume}.pdf")
61
- pdf.save 'result.pdf'
62
- puts 'Merging done'.color(:green)
63
- else
64
- puts "Copying #{name_of_resume}.pdf result.pdf".color(:green)
65
- pdf = CombinePDF.new
66
- pdf << CombinePDF.load("#{name_of_cover}.pdf")
67
- pdf << CombinePDF.load("#{name_of_resume}.pdf")
68
- pdf.save 'resumenew.pdf'
69
- system('cp resumenew.pdf result.pdf')
70
- puts 'Done'.color(:green)
71
- end
72
- appendix(name_of_pdf)
73
- end
74
-
75
- # Add additional stuff
76
- # @param [String] name_of_pdf Name of the finished pdf
77
- def self.appendix(name_of_pdf)
78
- puts 'Adding additional stuff'.color(:yellow)
79
- pdf = CombinePDF.new
80
- pdf << CombinePDF.load('result.pdf')
81
- # Put there your own stuff
82
- pdf << CombinePDF.load('../Appendix/Employers_Reference/xcom.pdf')
83
- pdf << CombinePDF.load('../Appendix/Employers_Reference/hays.pdf')
84
- pdf << CombinePDF.load('../Appendix/Certificates/thm-webeng1.pdf')
85
- pdf << CombinePDF.load('../Appendix/Certificates/kompetenzpass12013.pdf')
86
- pdf << CombinePDF.load('../Appendix/Employers_Reference/openslx.pdf')
87
- pdf << CombinePDF.load('../Appendix/Employers_Reference/openslx1.pdf')
88
- pdf << CombinePDF.load('../Appendix/Certificates/Zertifikat_Sascha_Manns1.pdf')
89
- pdf << CombinePDF.load('../Appendix/First_References/ihk.pdf')
90
- pdf.save "#{name_of_pdf}.pdf"
91
- puts 'Additional stuff done'.color(:green)
92
- end
93
-
94
- # Copy result to .latex_curriculum_vitae
95
- # @param [String] name_of_pdf Name of the resulting PDF file
96
- # @param [String] data_dir Path to the data dir
97
- def self.copy_home(name_of_pdf, data_dir)
98
- puts "Copying #{name_of_pdf}.pdf to tmpdir".color(:yellow)
99
- system("cp #{name_of_pdf}.pdf #{data_dir}")
100
- puts 'Copied to tmpdir'.color(:green)
101
- end
102
- end
103
- end
1
+ # Copyright (C) 2015-2020 Sascha Manns <Sascha.Manns@outlook.de>
2
+ #
3
+ # This program is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ # Dependencies
17
+ require 'rainbow/ext/string'
18
+ require 'combine_pdf'
19
+ require 'fileutils'
20
+
21
+ # main Module
22
+ module LatexCurriculumVitae
23
+ # Module for creating the CV
24
+ module CV
25
+ # Create Curriculum Vitae method
26
+ # TODO: Try to fix this in future
27
+ # rubocop:disable Metrics/AbcSize
28
+ # @param [String] name_of_pdf Name of the resulting PDF file
29
+ # @param [String] name_of_resume Name of the resume file
30
+ # @param [String] tmp_dir contains the path to the
31
+ def self.create_cv(name_of_resume, tmp_dir)
32
+ puts 'First run of xelatex'.color(:yellow)
33
+ system("xelatex #{name_of_resume}.tex")
34
+ puts 'First run of xelatex passed'.color(:yellow)
35
+ puts 'Running biber'.color(:yellow)
36
+ system("biber #{name_of_resume}.bcf")
37
+ puts 'Run of biber passed'.color(:yellow)
38
+ puts 'Second run of xelatex'.color(:yellow)
39
+ system("xelatex #{name_of_resume}.tex")
40
+ puts 'Second run of xelatex passed'.color(:yellow)
41
+ puts 'All done'.color(:green)
42
+ system("cp #{name_of_resume}.pdf #{tmp_dir}/#{name_of_resume}.pdf")
43
+ end
44
+
45
+ # Create the final cv
46
+ # @param [String] letter With motivational letter? Can be yes or no
47
+ # @param [String] name_of_letter Name of the motivational letter file
48
+ # @param [String] name_of_resume Name of the resume file
49
+ # @param [String] name_of_pdf Name of the finished pdf
50
+ # @param [String] name_of_cover Name of the Cover file
51
+ # TODO: Try to fix this in future
52
+ # This method smells of :reek:LongParameterList
53
+ # This method smells of :reek:ControlParameter
54
+ def self.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover)
55
+ if letter == 'yes'
56
+ puts 'Merging the motivational letter with the cv'.color(:yellow)
57
+ pdf = CombinePDF.new
58
+ pdf << CombinePDF.load("#{name_of_letter}.pdf")
59
+ pdf << CombinePDF.load("#{name_of_cover}.pdf")
60
+ pdf << CombinePDF.load("#{name_of_resume}.pdf")
61
+ pdf.save 'result.pdf'
62
+ puts 'Merging done'.color(:green)
63
+ else
64
+ puts "Copying #{name_of_resume}.pdf result.pdf".color(:green)
65
+ pdf = CombinePDF.new
66
+ pdf << CombinePDF.load("#{name_of_cover}.pdf")
67
+ pdf << CombinePDF.load("#{name_of_resume}.pdf")
68
+ pdf.save 'resumenew.pdf'
69
+ system('cp resumenew.pdf result.pdf')
70
+ puts 'Done'.color(:green)
71
+ end
72
+ appendix(name_of_pdf)
73
+ end
74
+
75
+ # Add additional stuff
76
+ # @param [String] name_of_pdf Name of the finished pdf
77
+ def self.appendix(name_of_pdf)
78
+ puts 'Adding additional stuff'.color(:yellow)
79
+ pdf = CombinePDF.new
80
+ pdf << CombinePDF.load('result.pdf')
81
+ # Put there your own stuff
82
+ pdf << CombinePDF.load('../Appendix/Employers_Reference/xcom.pdf')
83
+ pdf << CombinePDF.load('../Appendix/Employers_Reference/hays.pdf')
84
+ pdf << CombinePDF.load('../Appendix/Certificates/thm-webeng1.pdf')
85
+ pdf << CombinePDF.load('../Appendix/Certificates/kompetenzpass12013.pdf')
86
+ pdf << CombinePDF.load('../Appendix/Employers_Reference/openslx.pdf')
87
+ pdf << CombinePDF.load('../Appendix/Employers_Reference/openslx1.pdf')
88
+ pdf << CombinePDF.load('../Appendix/Certificates/Zertifikat_Sascha_Manns1.pdf')
89
+ pdf << CombinePDF.load('../Appendix/First_References/ihk.pdf')
90
+ pdf.save "#{name_of_pdf}.pdf"
91
+ puts 'Additional stuff done'.color(:green)
92
+ end
93
+
94
+ # Copy result to .latex_curriculum_vitae
95
+ # @param [String] name_of_pdf Name of the resulting PDF file
96
+ # @param [String] data_dir Path to the data dir
97
+ def self.copy_home(name_of_pdf, data_dir)
98
+ puts "Copying #{name_of_pdf}.pdf to tmpdir".color(:yellow)
99
+ system("cp #{name_of_pdf}.pdf #{data_dir}")
100
+ puts 'Copied to tmpdir'.color(:green)
101
+ end
102
+ end
103
+ end