latex_curriculum_vitae 1.3.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8acbd143041117803f88e487b55c96aeddb5263e
4
- data.tar.gz: 54174c8fe85d3c07983a638ee285bd8459d88957
3
+ metadata.gz: e3dea95dad228ad634fe3efbb454deef798485df
4
+ data.tar.gz: 927973befbdd894e8ba82f40e563a9b5cc1f6aaf
5
5
  SHA512:
6
- metadata.gz: 58145b3113a93b29aec0e5b6713ab9b03dbd01e217716e0deb89eb66ebfac7004fcfd8c2ad4b4d9d3ebfeae7d66e8ab8263e7b8267f413217f2a0e75b4961d1b
7
- data.tar.gz: 8c65ef6287f7db87c989684d459b4f3d5fcfee4b31ddb8f569e893ed3994fd13dc84db1a83fa0d367e898f7ecfa9511ba31ef7f08780b91f26c975263bcf45dd
6
+ metadata.gz: bdce9f3f1c1c88b8f4ceef90aee0f3c44cdae2f0237ca035c94937045159ccde33e2cb65b38b57d0426d01a5415cf66736caf13a156cd8d5fdc617d2c1e99c19
7
+ data.tar.gz: 25354c1e1a891547508584f338435c045b6ac3c6ae183ed1ab690807512cb6baa3b0692ad90d5d38f0ab63e9654f6b34352192b5c6d1a34f8cfcc371977c34bc
data/.rubocop.yml CHANGED
@@ -2,7 +2,6 @@ AllCops:
2
2
 
3
3
  Include:
4
4
  - 'lib/**/*.rb'
5
- - 'spec/**/*.rb'
6
5
 
7
6
  Exclude:
8
7
  - 'Rakefile'
data/.travis.yml CHANGED
@@ -26,4 +26,4 @@ after_success:
26
26
 
27
27
  notifications:
28
28
  email:
29
- - samannsml@directbox.com
29
+ - Sascha.Manns@mailbox.org
data/CONTRIBUTING.md CHANGED
@@ -22,4 +22,4 @@ based on `master` will likely be cherry picked.
22
22
 
23
23
  Need to report an issue? Use that issue tracker:
24
24
 
25
- * https://saigkill.myjetbrains.com/youtrack/issues
25
+ * https://github.com/saigkill/latex_curriculum_vitae/issues
data/Gemfile CHANGED
@@ -4,28 +4,26 @@
4
4
 
5
5
  source "https://rubygems.org/"
6
6
 
7
- gem "setup", "~>5.2"
8
7
  gem "notifier", "~>0.5"
9
8
  gem "pony", "~>1.11"
10
9
  gem "combine_pdf", "~>0.2"
11
10
  gem "url_shortener", "~>0.0.9"
11
+ gem "xdg", "~>2.2"
12
12
 
13
13
  gem "hoe-highline", "~>0.2", :group => [:development, :test]
14
14
  gem "hoe-bundler", "~>1.3", :group => [:development, :test]
15
- gem "hoe-doofus", "~>1.0", :group => [:development, :test]
16
15
  gem "hoe-git", "~>1.6", :group => [:development, :test]
17
16
  gem "hoe-rubygems", "~>1.0", :group => [:development, :test]
18
- gem "hoe-manns", "~>1.5", :group => [:development, :test]
17
+ gem "hoe-manns", "~>1.6", :group => [:development, :test]
19
18
  gem "hoe-reek", "~>1.1", :group => [:development, :test]
20
19
  gem "hoe-rubocop", "~>1.0", :group => [:development, :test]
21
20
  gem "hoe-version", "~>1.2", :group => [:development, :test]
22
21
  gem "hoe-seattlerb", "~>1.3", :group => [:development, :test]
23
- gem "hoe", "~>3.15", :group => [:development, :test]
24
- gem "rake", "~>11.2", :group => [:development, :test]
25
- gem "simplecov", "~>0.12", :group => [:development, :test]
22
+ gem "hoe", "~>3.16", :group => [:development, :test]
23
+ gem "rake", "~>12.0", :group => [:development, :test]
26
24
  gem "coveralls", "~>0.8", :group => [:development, :test]
27
- gem "rainbow", "~>2.0", :group => [:development, :test]
28
- gem "bundler", "~>1.11", :group => [:development, :test]
25
+ gem "rainbow", "~>2.2", :group => [:development, :test]
26
+ gem "bundler", "~>1.14", :group => [:development, :test]
29
27
  gem "parseconfig", "~>1.0", :group => [:development, :test]
30
28
  gem "rspec", "~>3.5", :group => [:development, :test]
31
29
  gem "rdoc", "~>4.0", :group => [:development, :test]
data/Gemfile.lock CHANGED
@@ -32,21 +32,20 @@ GEM
32
32
  rake (>= 0.8, < 13.0)
33
33
  hoe-bundler (1.3.0)
34
34
  hoe (>= 2.2.0)
35
- hoe-doofus (1.0.0)
36
35
  hoe-git (1.6.0)
37
36
  hoe-highline (0.2.1)
38
37
  highline (~> 1.6)
39
38
  hoe (~> 3.11)
40
- hoe-manns (1.6.1)
39
+ hoe-manns (1.6.2)
41
40
  bundler-audit (~> 0.5)
42
41
  parseconfig (~> 1.0)
43
- rainbow (~> 2.1)
44
- hoe-reek (1.1.7)
45
- bundler (~> 1.11)
46
- reek (~> 4.4)
47
- hoe-rubocop (1.0.7)
48
- bundler (~> 1.11)
49
- rubocop (~> 0.42)
42
+ rainbow (~> 2.2)
43
+ hoe-reek (1.1.8)
44
+ bundler (~> 1.13)
45
+ reek (~> 4.5)
46
+ hoe-rubocop (1.0.8)
47
+ bundler (~> 1.14)
48
+ rubocop (~> 0.47)
50
49
  hoe-rubygems (1.0.0)
51
50
  hoe-seattlerb (1.3.5)
52
51
  hoe-version (1.2.0)
@@ -69,7 +68,7 @@ GEM
69
68
  mail (>= 2.0)
70
69
  powerpack (0.1.1)
71
70
  rainbow (2.2.1)
72
- rake (11.3.0)
71
+ rake (12.0.0)
73
72
  rdoc (4.3.0)
74
73
  reek (4.5.6)
75
74
  codeclimate-engine-rb (~> 0.4.0)
@@ -96,7 +95,6 @@ GEM
96
95
  unicode-display_width (~> 1.0, >= 1.0.1)
97
96
  ruby-progressbar (1.8.1)
98
97
  ruby-rc4 (0.1.5)
99
- setup (5.2.0)
100
98
  simplecov (0.12.0)
101
99
  docile (~> 1.1.0)
102
100
  json (>= 1.8, < 3)
@@ -116,20 +114,20 @@ GEM
116
114
  coercible (~> 1.0)
117
115
  descendants_tracker (~> 0.0, >= 0.0.3)
118
116
  equalizer (~> 0.0, >= 0.0.9)
117
+ xdg (2.2.3)
119
118
 
120
119
  PLATFORMS
121
120
  ruby
122
121
 
123
122
  DEPENDENCIES
124
- bundler (~> 1.11)
123
+ bundler (~> 1.14)
125
124
  combine_pdf (~> 0.2)
126
125
  coveralls (~> 0.8)
127
- hoe (~> 3.15)
126
+ hoe (~> 3.16)
128
127
  hoe-bundler (~> 1.3)
129
- hoe-doofus (~> 1.0)
130
128
  hoe-git (~> 1.6)
131
129
  hoe-highline (~> 0.2)
132
- hoe-manns (~> 1.5)
130
+ hoe-manns (~> 1.6)
133
131
  hoe-reek (~> 1.1)
134
132
  hoe-rubocop (~> 1.0)
135
133
  hoe-rubygems (~> 1.0)
@@ -138,13 +136,12 @@ DEPENDENCIES
138
136
  notifier (~> 0.5)
139
137
  parseconfig (~> 1.0)
140
138
  pony (~> 1.11)
141
- rainbow (~> 2.0)
142
- rake (~> 11.2)
139
+ rainbow (~> 2.2)
140
+ rake (~> 12.0)
143
141
  rdoc (~> 4.0)
144
142
  rspec (~> 3.5)
145
- setup (~> 5.2)
146
- simplecov (~> 0.12)
147
143
  url_shortener (~> 0.0.9)
144
+ xdg (~> 2.2)
148
145
 
149
146
  BUNDLED WITH
150
- 1.13.6
147
+ 1.14.5
data/History.rdoc CHANGED
@@ -1,3 +1,11 @@
1
+ === 2.0.0 / 2017-02-27
2
+
3
+ * 1 major enhancement
4
+
5
+ * Bug-9: Using of XDG directories instead of .latex_curriculum_vitae
6
+ * Using regular tempdir instead using the datadir directly
7
+ * Fixed shorten url: Check if no url is given
8
+
1
9
  === 1.3.1 / 2017-02-23
2
10
 
3
11
  * 1 minor enhancement
data/LICENSE.rdoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  (The MIT License)
4
4
 
5
- Copyright (c) 2015-2016 Sascha Manns <Sascha.Manns@mailbox.org>
5
+ Copyright (c) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
6
 
7
7
  Permission is hereby granted, free of charge, to any person obtaining
8
8
  a copy of this software and associated documentation files (the
data/Manifest.txt CHANGED
@@ -27,6 +27,7 @@ data/latex_curriculum_vitae/Appendix/Employers_Reference/haysnew.pdf
27
27
  data/latex_curriculum_vitae/Appendix/Employers_Reference/openslx.pdf
28
28
  data/latex_curriculum_vitae/Appendix/Employers_Reference/openslx1.pdf
29
29
  data/latex_curriculum_vitae/Appendix/Employers_Reference/wtg.pdf
30
+ data/latex_curriculum_vitae/Appendix/Employers_Reference/xcom.pdf
30
31
  data/latex_curriculum_vitae/Appendix/First_References/bsaz.pdf
31
32
  data/latex_curriculum_vitae/Appendix/First_References/hsaz.pdf
32
33
  data/latex_curriculum_vitae/Appendix/First_References/ihk.pdf
data/README.rdoc CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  home :: http://saigkill.tuxfamily.org
4
4
  code :: https://github.com/saigkill/latex_curriculum_vitae
5
- docs :: https://saigkill.tuxfamily.org/dotclear/docs/latex_curriculum_vitae/en-US/html/index.html
5
+ docs (en) :: https://saigkill.tuxfamily.org/docs/latex_curriculum_vitae/en-US/html/
6
+ docs (de) :: https://saigkill.tuxfamily.org/docs/latex_curriculum_vitae/de-DE/html/
6
7
  bugs :: https://github.com/saigkill/latex_curriculum_vitae/issues
7
8
  openhub statistics :: https://www.openhub.net/p/latex_curriculum_vitae
8
9
  min. rubyver :: 2.2.0
@@ -38,7 +39,7 @@ in your home directory. Also it generates an email with a standard content, whic
38
39
 
39
40
  The resulting PDF and the CSV file are placed in /home/You/.latex_curriculum_vitae.
40
41
 
41
- Read the documentation at: https://saigkill.tuxfamily.org/dotclear/docs/latex_curriculum_vitae/en-US/html/index.html
42
+ Read the documentation at: https://saigkill.tuxfamily.org/docs/latex_curriculum_vitae/en-US/html/
42
43
 
43
44
  This Gem was programmed and tested for Linux systems. If anyone would like to make the methods also fit for other OS,
44
45
  i'm happy about Pull requests.
@@ -65,7 +66,7 @@ The installation is very easy.
65
66
  cd /path/to/gem (In case of using RVM ~/.rvm/gems/ruby-2.2.3/gems/latex_curriculum_vitae)
66
67
  rake setup
67
68
 
68
- Read the documentation at: https://saigkill.tuxfamily.org/dotclear/docs/latex_curriculum_vitae/en-US/html/index.html
69
+ Read the documentation at: https://saigkill.tuxfamily.org/docs/latex_curriculum_vitae/en-US/html/
69
70
 
70
71
  You have to run the setup after each gem update.
71
72
 
data/Rakefile CHANGED
@@ -14,25 +14,17 @@ require 'hoe'
14
14
  # rubocop:disable Metrics/LineLength
15
15
  ############################################# DEVELOPING ZONE #########################################################
16
16
  Hoe.plugin :bundler
17
- # Hoe.plugin :deveiate
18
17
  Hoe.plugin :doofus
19
18
  Hoe.plugin :email
20
- # Hoe.plugin :gem_prelude_sucks
21
19
  #Hoe.plugins.delete :git
22
20
  Hoe.plugin :git
23
21
  Hoe.plugin :history
24
22
  Hoe.plugin :highline
25
- #Hoe.plugin :inline
26
23
  Hoe.plugin :manns
27
- # Hoe.plugin :mercurial
28
- # Hoe.plugin :perforce
29
- # Hoe.plugin :racc
30
- # Hoe.plugin :rcov
31
24
  #Hoe.plugin :reek
32
25
  Hoe.plugin :rdoc
33
26
  Hoe.plugin :rubocop
34
27
  Hoe.plugin :rubygems
35
- # Hoe.plugin :seattlerb
36
28
  Hoe.plugin :version
37
29
  Hoe.plugin :website
38
30
 
@@ -49,52 +41,50 @@ Hoe.spec 'latex_curriculum_vitae' do
49
41
  self.extra_rdoc_files = FileList['*.rdoc'].to_a
50
42
  self.post_install_message = '*** Run rake setup to finish the installation *** Please file bugreports and feature requests on: https://github.com/saigkill/latex_curriculum_vitae/issues'
51
43
 
52
- dependency 'setup', '~> 5.2'
53
44
  dependency 'notifier', '~> 0.5'
54
45
  dependency 'pony', '~> 1.11'
55
46
  dependency 'combine_pdf', '~> 0.2'
56
47
  dependency 'url_shortener', '~> 0.0.9'
48
+ dependency 'xdg', '~> 2.2'
57
49
 
58
50
  extra_dev_deps << ['hoe-bundler', '~> 1.3']
59
- extra_dev_deps << ['hoe-doofus', '~> 1.0']
60
51
  extra_dev_deps << ['hoe-git', '~> 1.6']
61
52
  extra_dev_deps << ['hoe-rubygems', '~> 1.0']
62
- extra_dev_deps << ['hoe-manns', '~> 1.5']
53
+ extra_dev_deps << ['hoe-manns', '~> 1.6']
63
54
  extra_dev_deps << ['hoe-reek', '~> 1.1']
64
55
  extra_dev_deps << ['hoe-rubocop', '~> 1.0']
65
56
  extra_dev_deps << ['hoe-version', '~> 1.2']
66
57
  extra_dev_deps << ['hoe-seattlerb', '~> 1.3']
67
- extra_dev_deps << ['hoe', '~> 3.15']
68
- extra_dev_deps << ['rake', '~> 11.2']
69
- extra_dev_deps << ['simplecov', '~> 0.12']
58
+ extra_dev_deps << ['hoe', '~> 3.16']
59
+ extra_dev_deps << ['rake', '~> 12.0']
70
60
  extra_dev_deps << ['coveralls', '~> 0.8']
71
- extra_dev_deps << ['rainbow', '~> 2.0']
72
- extra_dev_deps << ['bundler', '~> 1.11']
61
+ extra_dev_deps << ['rainbow', '~> 2.2']
62
+ extra_dev_deps << ['bundler', '~> 1.14']
73
63
  extra_dev_deps << ['parseconfig', '~> 1.0']
74
64
  extra_dev_deps << ['rspec', '~> 3.5']
75
- extra_dev_deps << ['simplecov', '~> 0.10']
76
65
  end
77
66
 
78
67
  ###################################### SETUP ZONE #####################################################################
79
68
 
80
69
  require 'fileutils'
70
+ require 'xdg'
81
71
  desc 'Setup'
82
72
  task :setup do
83
- datadir = "#{Dir.home}/.rvm/rubies/default/share"
84
- FileUtils.cp("#{Dir.home}/.latex_curriculum_vitae/latex_curriculum_vitae.cfg",
85
- "#{Dir.home}/.latex_curriculum_vitae/latex_curriculum_vitae.cfg.my")
86
- FileUtils.cp("#{Dir.home}/.latex_curriculum_vitae/personal_data.tex", "#{Dir.home}/.latex_curriculum_vitae/personal_data.tex.my")
87
- FileUtils.mkdir("#{datadir}/latex_curriculum_vitae-backup") if !File.exist?("#{datadir}/latex_curriculum_vitae-backup")
88
- FileUtils.cp_r "#{datadir}/latex_curriculum_vitae/.", "#{datadir}/latex_curriculum_vitae-backup/." if
89
- File.exist?("#{datadir}/latex_curriculum_vitae/")
90
- system('setup.rb uninstall --force')
91
- system('setup.rb config --sysconfdir=$HOME/.latex_curriculum_vitae')
92
- system('setup.rb install')
93
- FileUtils.cp("#{Dir.home}/.latex_curriculum_vitae/latex_curriculum_vitae.cfg.my",
94
- "#{Dir.home}/.latex_curriculum_vitae/latex_curriculum_vitae.cfg")
95
- FileUtils.cp("#{Dir.home}/.latex_curriculum_vitae/personal_data.tex.my", "#{Dir.home}/.latex_curriculum_vitae/personal_data.tex")
73
+ sysxdg = XDG['CONFIG_HOME']
74
+ dataxdg = XDG['DATA_HOME']
75
+ sysconfdir = "#{sysxdg}/latex_curriculum_vitae"
76
+ datadir = "#{dataxdg}/latex_curriculum_vitae"
77
+ home = Dir.home
78
+ FileUtils.mkdir(sysconfdir) if !File.exist?(sysconfdir)
79
+ FileUtils.mkdir(datadir) if !File.exist?(datadir)
80
+ FileUtils.cp('etc/latex_curriculum_vitae.cfg', "#{sysconfdir}") if !File.exist?("#{sysconfdir}/latex_curriculum_vitae.cfg")
81
+ FileUtils.cp('etc/personal_data.tex', "#{sysconfdir}") if !File.exist?("#{sysconfdir}/personal_data.tex")
82
+ FileUtils.cp_r('data/latex_curriculum_vitae/.', "#{datadir}") if !File.exist?("#{datadir}/Appendix")
83
+ FileUtils.cp('data/latex_curriculum_vitae/Pictures/arbeitsagentur.png', "#{dataxdg}/icons")
84
+ FileUtils.rm_rf("#{home}/.rvm/rubies/default/lib/ruby/site_ruby/2.2.0/latex_curriculum_vitae") if File.exist?("#{home}/.rvm/rubies/default/lib/ruby/site_ruby/2.2.0/latex_curriculum_vitae/Resume/cv_10.tex")
85
+ FileUtils.rm_rf("#{home}/.rvm/rubies/default/lib/ruby/site_ruby/2.2.0/latex_curriculum_vitae.rb") if File.exist?("#{home}/.rvm/rubies/default/lib/ruby/site_ruby/2.2.0/latex_curriculum_vitae.rb")
96
86
  puts 'Creating Launcher...'.color(:yellow)
97
- desktopfile = "#{Dir.home}/.local/share/applications/latex_curriculum_vitae.desktop"
87
+ desktopfile = "#{dataxdg}/applications/latex_curriculum_vitae.desktop"
98
88
  FileUtils.touch(desktopfile)
99
89
  File.write "#{desktopfile}", <<EOF
100
90
  [Desktop Entry]
@@ -104,7 +94,7 @@ Name=latex_curriculum_vitae
104
94
  GenericName=latex_curriculum_vitae
105
95
  Comment=Job-Application Creator
106
96
  Exec=latexcv.rb
107
- Icon="#{Dir.home}/.local/share/icons/arbeitsagentur.png"
97
+ Icon="#{dataxdg}/icons/arbeitsagentur.png"
108
98
  Categories=Utility;Application;
109
99
  EOF
110
100
  puts 'Setup is now finished. See the documentation to find out more about this gem.'
data/bin/latexcv.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # @author Sascha Manns
3
3
  # @abstract Binary for latex_curriculum_vitae
4
4
  #
5
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
5
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
6
  # License: MIT
7
7
 
8
8
  # Dependencies
@@ -1,7 +1,7 @@
1
1
  % @author Sascha Manns
2
2
  % @abstract Cover for latex_curriculum_vitae
3
3
  %
4
- % Copyright (C) 2015-2016 Sascha Manns <Sascha.Manns@mailbox.org>
4
+ % Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
5
5
  % License: MIT
6
6
 
7
7
  \documentclass[a4paper,11pt]{scrartcl}
@@ -39,12 +39,12 @@
39
39
  % -------------------------------------------------
40
40
  % personal data
41
41
  % -------------------------------------------------
42
- \input{$HOME/.latex_curriculum_vitae/personal_data.tex}
42
+ \input{$HOME/.config/latex_curriculum_vitae/personal_data.tex}
43
43
  %
44
44
  % -------------------------------------------------
45
45
  % Firmendaten
46
46
  % -------------------------------------------------
47
- \input{$HOME/.latex_curriculum_vitae/entity.tex}
47
+ \input{$HOME/.config/latex_curriculum_vitae/entity.tex}
48
48
  % -------------------------------------------------
49
49
  % Aus der moderncvstylecasual.sty:
50
50
  % -------------------------------------------------
@@ -1,7 +1,7 @@
1
1
  % @author Sascha Manns
2
2
  % @abstract Motivational Letter for latex_curriculum_vitae
3
3
  %
4
- % Copyright (C) 2015-2016 Sascha Manns <Sascha.Manns@mailbox.org>
4
+ % Copyright (C) 2015-2016 Sascha Manns <Sascha.Manns@mailbox.org>
5
5
  % License: MIT
6
6
  %---------------------------------------------------------------------------
7
7
  \documentclass%%
@@ -62,12 +62,12 @@
62
62
  % -------------------------------------------------
63
63
  % Firmendaten
64
64
  % -------------------------------------------------
65
- \input{$HOME/.latex_curriculum_vitae/personal_data.tex}
65
+ \input{$HOME/.config/latex_curriculum_vitae/personal_data.tex}
66
66
 
67
67
  % -------------------------------------------------
68
68
  % Anzeigendetails
69
69
  % -------------------------------------------------
70
- \input{$HOME/.latex_curriculum_vitae/entity.tex}
70
+ \input{$HOME/.config/latex_curriculum_vitae/entity.tex}
71
71
  %---------------------------------------------------------------------------
72
72
  \begin{document}
73
73
  %---------------------------------------------------------------------------
@@ -10,6 +10,6 @@ own_port = "587"
10
10
  own_username = "myusername"
11
11
  own_password = "mypassword"
12
12
  pdf_reader = "/home/sascha/FoxitSoftware/FoxitReader/FoxitReader.sh"
13
- shorten_url = "yes"
13
+ shorten_url = "no" # currently it doesn't work
14
14
  bitly_user = "test"
15
15
  bitly_apikey = "0815"
@@ -2,7 +2,7 @@
2
2
  # @author Sascha Manns
3
3
  # @abstract A module for creating the latex cover
4
4
  #
5
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
5
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
6
  # License: MIT
7
7
 
8
8
  # Dependencies
@@ -2,7 +2,7 @@
2
2
  # @author Sascha Manns
3
3
  # @abstract CV Module for creating the curriculum vitae
4
4
  #
5
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
5
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
6
  # License: MIT
7
7
 
8
8
  # Dependencies
@@ -65,6 +65,7 @@ module LatexCurriculumVitae
65
65
  puts 'Adding additional stuff'.colour(:yellow)
66
66
  pdf = CombinePDF.new
67
67
  pdf << CombinePDF.load('result.pdf')
68
+ # Put there your own stuff
68
69
  pdf << CombinePDF.load('../Appendix/Employers_Reference/xcom.pdf')
69
70
  pdf << CombinePDF.load('../Appendix/Employers_Reference/hays.pdf')
70
71
  pdf << CombinePDF.load('../Appendix/Certificates/thm-webeng1.pdf')
@@ -79,9 +80,9 @@ module LatexCurriculumVitae
79
80
 
80
81
  # Copy result to .latex_curriculum_vitae
81
82
  # @param [String] name_of_pdf Name of the resulting PDF file
82
- def self.copy_home(name_of_pdf)
83
+ def self.copy_home(name_of_pdf, datadir)
83
84
  puts "Copying #{name_of_pdf}.pdf to tmpdir".colour(:yellow)
84
- system("cp #{name_of_pdf}.pdf #{Dir.home}/.latex_curriculum_vitae")
85
+ system("cp #{name_of_pdf}.pdf #{datadir}")
85
86
  puts 'Copied to tmpdir'.colour(:green)
86
87
  end
87
88
  end
@@ -3,7 +3,7 @@
3
3
  # @author Sascha Manns
4
4
  # @abstract module for preparing a email and send it out
5
5
  #
6
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
7
7
  # License: MIT
8
8
 
9
9
  # Dependencies
@@ -25,14 +25,14 @@ module LatexCurriculumVitae
25
25
  # @param [String] proactive Can be yes or no
26
26
  # @param [String] letter For preparing the letter
27
27
  # @param [String] name_of_pdf Name of the output pdf
28
- def self.create_email(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf)
29
- own_email_address, own_smtp, own_username, own_password, own_port, own_tls = LatexCurriculumVitae::GetConfig.get_smtp
28
+ def self.create_email(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf, sysconfdir, datadir)
29
+ own_email_address, own_smtp, own_username, own_password, own_port, own_tls = LatexCurriculumVitae::GetConfig.get_smtp(sysconfdir)
30
30
  introduction = LatexCurriculumVitae::Email.introduction(contact, contact_sex)
31
31
  subject = LatexCurriculumVitae::Email.subject(proactive, jobtitle)
32
32
  body = LatexCurriculumVitae::Email.get_body(introduction, letter)
33
- home = Dir.home
34
- filename = "#{home}/.latex_curriculum_vitae/#{name_of_pdf}.pdf"
33
+ filename = "#{datadir}/#{name_of_pdf}.pdf"
35
34
 
35
+ # More information about Pony Mailer: https://github.com/benprew/pony
36
36
  Pony.mail({
37
37
  :to => emailaddress,
38
38
  :bcc => own_email_address,
@@ -155,14 +155,14 @@ EOF
155
155
  # @param [String] proactive Can be yes or no
156
156
  # @param [String] letter With motivational letter? Can be yes or no
157
157
  # @param [String] name_of_pdf Name of the resulting PDF file
158
- def self.resultok(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf)
158
+ def self.resultok(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf, sysconfdir, datadir)
159
159
  resultfileok = `yad --title="Resulting file" --center --on-top --form \
160
160
  --item-separator=, --separator="|" \
161
161
  --field="Resulting file ok?:CBE" \
162
162
  "yes,no"`
163
163
  ok = resultfileok.chomp.split('|')
164
164
  if ok.include? 'yes'
165
- LatexCurriculumVitae::Email.create_email(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf)
165
+ LatexCurriculumVitae::Email.create_email(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf, sysconfdir, datadir)
166
166
  else
167
167
  abort('Aborted')
168
168
  end
@@ -3,7 +3,7 @@
3
3
  # @author Sascha Manns
4
4
  # @abstract module for creating the entity file for latex
5
5
  #
6
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
7
7
  # License: MIT
8
8
 
9
9
  # Dependencies
@@ -59,21 +59,6 @@ module LatexCurriculumVitae
59
59
  return joburl
60
60
  end
61
61
 
62
- # # Method for getting information through a real gui
63
- # def self.get_information_gui(entitytex)
64
- # # TODO: Extend code for using the gtk GUI
65
- # require 'gtk2'
66
- # require 'libglade2'
67
- # @threads = []
68
- #
69
- # Gtk.init
70
- #
71
- # @glade = GladeXML.new('glade/latexcv.glade')
72
- # @glade.widget_names.each do |name|
73
- # instance_variable_set("@#{name}".intern, @glade[name])
74
- # end
75
- # end
76
-
77
62
  # Method for creating the entity.tex
78
63
  # @param [String] jobtitle Title of the target job
79
64
  # @param [String] company Comanys name
@@ -3,7 +3,7 @@
3
3
  # @author Sascha Manns
4
4
  # @abstract module for getting information from a config file
5
5
  #
6
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
7
7
  # License: MIT
8
8
 
9
9
  # Dependencies
@@ -15,9 +15,8 @@ module LatexCurriculumVitae
15
15
  module GetConfig
16
16
  # This method gets the configs from the config file
17
17
  # @return [Array] name_of_pdf, name_of_cover, name_of_resume, name_of_letter, pdf_reader, shorten_url, bitly_user, bitly_apikey
18
- def self.get
19
- home = Dir.home
20
- config = ParseConfig.new("#{home}/.latex_curriculum_vitae/latex_curriculum_vitae.cfg")
18
+ def self.get(sysconfdir)
19
+ config = ParseConfig.new("#{sysconfdir}/latex_curriculum_vitae.cfg")
21
20
  name_of_pdf = config['name_of_pdf']
22
21
  name_of_cover = config['name_of_cover']
23
22
  name_of_resume = config['name_of_resume']
@@ -32,9 +31,8 @@ module LatexCurriculumVitae
32
31
 
33
32
  # Method for getting smtp configuration
34
33
  # @return [Array] own_name, own_email_address, own_smtp, own_username, own_password, own_port, own_domain, own_tls
35
- def self.get_smtp
36
- home = Dir.home
37
- config = ParseConfig.new("#{home}/.latex_curriculum_vitae/latex_curriculum_vitae.cfg")
34
+ def self.get_smtp(sysconfdir)
35
+ config = ParseConfig.new("#{sysconfdir}/latex_curriculum_vitae.cfg")
38
36
  # own_name = config['own_name']
39
37
  own_email_address = config['own_email_address']
40
38
  own_smtp = config['own_smtp']
@@ -3,7 +3,7 @@
3
3
  # @author Sascha Manns
4
4
  # @abstract module for creating a motivational letter
5
5
  #
6
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
7
7
  # License: MIT
8
8
 
9
9
  # Dependencies
@@ -4,7 +4,7 @@
4
4
  # @abstract module for notify the user about finishing the email send
5
5
  # process
6
6
  #
7
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
7
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
8
8
  # License: MIT
9
9
 
10
10
  # Dependencies
@@ -17,11 +17,8 @@ module LatexCurriculumVitae
17
17
  # Method for notifying the user
18
18
  module Notify
19
19
  # @param [String] jobtitle The Title of your job application
20
- def self.run(jobtitle)
21
- home = Dir.home
22
- prefix = "#{home}/.rvm/rubies/default"
23
- datadir = "#{prefix}/share"
24
- img = "#{datadir}/latex_curriculum_vitae/Pictures/arbeitsagentur.png"
20
+ def self.run(jobtitle, datadir)
21
+ img = "#{datadir}/share/icons/arbeitsagentur.png"
25
22
  Notifier.notify(
26
23
  :image => "#{img}",
27
24
  :title => "Your Job Application",
@@ -3,7 +3,7 @@
3
3
  # @author Sascha Manns
4
4
  # @abstract module for adding new applications on the csv table
5
5
  #
6
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
7
7
  # License: MIT
8
8
 
9
9
  # Dependencies
@@ -3,13 +3,15 @@
3
3
  # @author Sascha Manns
4
4
  # @abstract Main Module for latex_curriculum_vitae
5
5
  #
6
- # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
+ # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
7
7
  # License: MIT
8
8
 
9
9
  # rubocop:disable Metrics/LineLength
10
10
 
11
11
  # Dependencies
12
12
  require 'fileutils'
13
+ require 'xdg'
14
+ require 'tmpdir'
13
15
 
14
16
  require File.expand_path(File.join(File.dirname(__FILE__), 'latex_curriculum_vitae/entityfile'))
15
17
  require File.expand_path(File.join(File.dirname(__FILE__), 'latex_curriculum_vitae/cv'))
@@ -23,16 +25,20 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'latex_curriculum_vit
23
25
  # Main Class LatexCurriculumVitae
24
26
  module LatexCurriculumVitae
25
27
  # The version information
26
- VERSION = '1.3.1'
28
+ VERSION = '2.0.0'
27
29
 
28
30
  # Variables
29
- home = Dir.home
30
- prefix = "#{home}/.rvm/rubies/default"
31
- datadir = "#{prefix}/share"
32
- entitytex = "#{home}/.latex_curriculum_vitae/entity.tex"
33
- csvout = "#{home}/.latex_curriculum_vitae/job-applications.csv"
34
- tmpdir = "#{datadir}/latex_curriculum_vitae/tmp"
35
- name_of_pdf, name_of_cover, name_of_resume, name_of_letter, pdf_reader, shorten_url, bitly_user, bitly_apikey = LatexCurriculumVitae::GetConfig.get
31
+ sysxdg = XDG['CONFIG_HOME']
32
+ dataxdg = XDG['DATA_HOME']
33
+ sysconfdir = "#{sysxdg}/latex_curriculum_vitae"
34
+ datadir = "#{dataxdg}/latex_curriculum_vitae"
35
+ entitytex = "#{sysconfdir}/entity.tex"
36
+ csvout = "#{sysconfdir}/job-applications.csv"
37
+ tempdir = '/tmp/latex_curriculum_vitae'
38
+ tmpdir = "#{tempdir}/build"
39
+
40
+ name_of_pdf, name_of_cover, name_of_resume, name_of_letter, pdf_reader, shorten_url, bitly_user, bitly_apikey =
41
+ LatexCurriculumVitae::GetConfig.get(sysconfdir)
36
42
 
37
43
  # Get the needed Information for creating the application
38
44
  contact, emailaddress, jobtitle, contact_sex, company, letter, proactive, job_url =
@@ -43,44 +49,55 @@ module LatexCurriculumVitae
43
49
  joburl = 'No URL available (Proactive)'
44
50
  else
45
51
  if shorten_url == 'yes'
46
- joburl = LatexCurriculumVitae::Entityfile.shorten_url(job_url, bitly_user, bitly_apikey)
52
+ if shorten_url != ''
53
+ joburl = LatexCurriculumVitae::Entityfile.shorten_url(job_url, bitly_user, bitly_apikey)
54
+ else
55
+ puts 'No url given'
56
+ end
47
57
  else
48
58
  joburl = job_url
49
59
  end
50
60
  end
51
61
 
62
+ # Remove old tempdir and copy data to tempdir
63
+ FileUtils.rm_rf(tempdir) if File.exist?("#{tempdir}/Resume/cv_10.tex")
64
+ FileUtils.mkdir(tempdir)
65
+ FileUtils.mkdir(tmpdir)
66
+ FileUtils.cp_r("#{datadir}/.", "#{tempdir}")
67
+
52
68
  # Create Motivational Letter
53
69
  if letter == 'yes'
54
- FileUtils.cd("#{datadir}/latex_curriculum_vitae/Motivational_Letter") do
70
+ FileUtils.cd("#{tempdir}/Motivational_Letter") do
55
71
  LatexCurriculumVitae::Letter.create_letter(tmpdir, name_of_letter)
56
72
  end
57
73
  end
58
74
 
59
75
  # Create the cover
60
- FileUtils.cd("#{datadir}/latex_curriculum_vitae/Cover") do
76
+ FileUtils.cd("#{tempdir}/Cover") do
61
77
  LatexCurriculumVitae::Cover.create_cover(name_of_cover, tmpdir)
62
78
  end
63
79
 
64
80
  # Create the Curriculum Vitae
65
- FileUtils.cd("#{datadir}/latex_curriculum_vitae/Resume") do
81
+ FileUtils.cd("#{tempdir}/Resume") do
66
82
  LatexCurriculumVitae::CV.create_cv(name_of_resume, tmpdir)
67
83
  end
68
84
 
69
85
  # Final create and shrinking
70
86
  FileUtils.cd(tmpdir) do
71
87
  LatexCurriculumVitae::CV.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover)
72
- LatexCurriculumVitae::CV.copy_home(name_of_pdf)
88
+ LatexCurriculumVitae::CV.copy_home(name_of_pdf, datadir)
73
89
  end
74
90
 
75
91
  # Add entry to Outfile
76
92
  CVOutfile.add_to_outfile(jobtitle, company, contact, emailaddress, csvout, joburl)
77
93
 
78
94
  # Start evince to check the output file
79
- system("#{pdf_reader} #{home}/.latex_curriculum_vitae/#{name_of_pdf}.pdf")
95
+ system("#{pdf_reader} #{datadir}/#{name_of_pdf}.pdf")
80
96
 
81
97
  # Ask if result is ok
82
- LatexCurriculumVitae::Email.resultok(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf)
98
+ LatexCurriculumVitae::Email.resultok(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf, sysconfdir, datadir)
83
99
 
84
100
  # Inform about creation is done
85
- LatexCurriculumVitae::Notify.run(jobtitle)
101
+ LatexCurriculumVitae::Notify.run(jobtitle, datadir)
102
+
86
103
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: latex_curriculum_vitae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sascha Manns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-23 00:00:00.000000000 Z
11
+ date: 2017-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: setup
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '5.2'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '5.2'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: notifier
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -81,47 +67,47 @@ dependencies:
81
67
  - !ruby/object:Gem::Version
82
68
  version: 0.0.9
83
69
  - !ruby/object:Gem::Dependency
84
- name: hoe-highline
70
+ name: xdg
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '0.2'
90
- type: :development
75
+ version: '2.2'
76
+ type: :runtime
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '0.2'
82
+ version: '2.2'
97
83
  - !ruby/object:Gem::Dependency
98
- name: hoe-bundler
84
+ name: hoe-highline
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: '1.3'
89
+ version: '0.2'
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
- version: '1.3'
96
+ version: '0.2'
111
97
  - !ruby/object:Gem::Dependency
112
- name: hoe-doofus
98
+ name: hoe-bundler
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
101
  - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: '1.0'
103
+ version: '1.3'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
108
  - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: '1.0'
110
+ version: '1.3'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: hoe-git
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +142,14 @@ dependencies:
156
142
  requirements:
157
143
  - - "~>"
158
144
  - !ruby/object:Gem::Version
159
- version: '1.5'
145
+ version: '1.6'
160
146
  type: :development
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
150
  - - "~>"
165
151
  - !ruby/object:Gem::Version
166
- version: '1.5'
152
+ version: '1.6'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: hoe-reek
169
155
  requirement: !ruby/object:Gem::Requirement
@@ -226,42 +212,28 @@ dependencies:
226
212
  requirements:
227
213
  - - "~>"
228
214
  - !ruby/object:Gem::Version
229
- version: '3.15'
215
+ version: '3.16'
230
216
  type: :development
231
217
  prerelease: false
232
218
  version_requirements: !ruby/object:Gem::Requirement
233
219
  requirements:
234
220
  - - "~>"
235
221
  - !ruby/object:Gem::Version
236
- version: '3.15'
222
+ version: '3.16'
237
223
  - !ruby/object:Gem::Dependency
238
224
  name: rake
239
225
  requirement: !ruby/object:Gem::Requirement
240
226
  requirements:
241
227
  - - "~>"
242
228
  - !ruby/object:Gem::Version
243
- version: '11.2'
229
+ version: '12.0'
244
230
  type: :development
245
231
  prerelease: false
246
232
  version_requirements: !ruby/object:Gem::Requirement
247
233
  requirements:
248
234
  - - "~>"
249
235
  - !ruby/object:Gem::Version
250
- version: '11.2'
251
- - !ruby/object:Gem::Dependency
252
- name: simplecov
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - "~>"
256
- - !ruby/object:Gem::Version
257
- version: '0.12'
258
- type: :development
259
- prerelease: false
260
- version_requirements: !ruby/object:Gem::Requirement
261
- requirements:
262
- - - "~>"
263
- - !ruby/object:Gem::Version
264
- version: '0.12'
236
+ version: '12.0'
265
237
  - !ruby/object:Gem::Dependency
266
238
  name: coveralls
267
239
  requirement: !ruby/object:Gem::Requirement
@@ -282,28 +254,28 @@ dependencies:
282
254
  requirements:
283
255
  - - "~>"
284
256
  - !ruby/object:Gem::Version
285
- version: '2.0'
257
+ version: '2.2'
286
258
  type: :development
287
259
  prerelease: false
288
260
  version_requirements: !ruby/object:Gem::Requirement
289
261
  requirements:
290
262
  - - "~>"
291
263
  - !ruby/object:Gem::Version
292
- version: '2.0'
264
+ version: '2.2'
293
265
  - !ruby/object:Gem::Dependency
294
266
  name: bundler
295
267
  requirement: !ruby/object:Gem::Requirement
296
268
  requirements:
297
269
  - - "~>"
298
270
  - !ruby/object:Gem::Version
299
- version: '1.11'
271
+ version: '1.14'
300
272
  type: :development
301
273
  prerelease: false
302
274
  version_requirements: !ruby/object:Gem::Requirement
303
275
  requirements:
304
276
  - - "~>"
305
277
  - !ruby/object:Gem::Version
306
- version: '1.11'
278
+ version: '1.14'
307
279
  - !ruby/object:Gem::Dependency
308
280
  name: parseconfig
309
281
  requirement: !ruby/object:Gem::Requirement
@@ -392,6 +364,7 @@ files:
392
364
  - data/latex_curriculum_vitae/Appendix/Employers_Reference/openslx.pdf
393
365
  - data/latex_curriculum_vitae/Appendix/Employers_Reference/openslx1.pdf
394
366
  - data/latex_curriculum_vitae/Appendix/Employers_Reference/wtg.pdf
367
+ - data/latex_curriculum_vitae/Appendix/Employers_Reference/xcom.pdf
395
368
  - data/latex_curriculum_vitae/Appendix/First_References/bsaz.pdf
396
369
  - data/latex_curriculum_vitae/Appendix/First_References/hsaz.pdf
397
370
  - data/latex_curriculum_vitae/Appendix/First_References/ihk.pdf