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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +158 -154
- data/CONTRIBUTING.md +21 -25
- data/LICENSE.md +635 -635
- data/MAINTENANCE.md +18 -18
- data/README.md +83 -84
- data/bin/latexcv.rb +19 -19
- data/bin/setup +7 -7
- data/data/latex_curriculum_vitae/Appendix/Bibliography/bibliography1.bib +69 -69
- data/data/latex_curriculum_vitae/Cover/Cover.tex +141 -141
- data/data/latex_curriculum_vitae/Motivational_Letter/bwanschreiben.tex +204 -204
- data/data/latex_curriculum_vitae/Pictures/.directory +4 -4
- data/data/latex_curriculum_vitae/Resume/cv_10.tex +440 -440
- data/data/latex_curriculum_vitae/Resume/friggeri-cv.cls +349 -349
- data/data/latex_curriculum_vitae/Resume/missfont.log +13 -13
- data/etc/latex_curriculum_vitae.cfg +15 -15
- data/etc/personal_data.tex +10 -10
- data/lib/latex_curriculum_vitae.rb +111 -110
- data/lib/latex_curriculum_vitae/cover.rb +32 -32
- data/lib/latex_curriculum_vitae/cv.rb +103 -103
- data/lib/latex_curriculum_vitae/email.rb +245 -245
- data/lib/latex_curriculum_vitae/entityfile.rb +186 -186
- data/lib/latex_curriculum_vitae/get-config.rb +58 -58
- data/lib/latex_curriculum_vitae/letter.rb +35 -35
- data/lib/latex_curriculum_vitae/notifier.rb +36 -36
- data/lib/latex_curriculum_vitae/outfile.rb +54 -54
- data/lib/latex_curriculum_vitae/version.rb +35 -35
- metadata +15 -22
@@ -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"
|
data/etc/personal_data.tex
CHANGED
@@ -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-
|
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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
#
|
52
|
-
#
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
FileUtils.
|
71
|
-
FileUtils.mkdir(
|
72
|
-
FileUtils.
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
LatexCurriculumVitae::CV.
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
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-
|
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-
|
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
|