resme 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/resme/renderer/renderer.rb +15 -5
- data/lib/resme/templates/europass/eu.xml.erb +106 -29
- data/lib/resme/templates/resume.md.erb +46 -48
- data/lib/resme/version.rb +1 -1
- metadata +3 -10
- data/lib/resme/templates/html/css/main.css +0 -87
- data/lib/resme/templates/html/css/normalize.css +0 -424
- data/lib/resme/templates/html/index.html.erb +0 -22
- data/lib/resme/templates/html/js/main.js +0 -0
- data/lib/resme/templates/html/js/plugins.js +0 -24
- data/lib/resme/templates/html/js/vendor/jquery-1.12.0.min.js +0 -5
- data/lib/resme/templates/html/js/vendor/modernizr-2.8.3.min.js +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c6651b4bfa0fa13684adffb20867adec59cbc93d7d611451f68b042e0f41147d
|
4
|
+
data.tar.gz: f53176624b4f6dd462bcedeee0ac9d1233b3dfa374ef377cd7237c60878733c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ef0373b98367dd22913213ef546899b8f20161d5e3cd8e4db4982e8d5602d9b3006fade7f899ce6010a82dda06a7f306c7f702150d8a099a7f39dff19015a24
|
7
|
+
data.tar.gz: 2bf517a51726b9a89d6a7f71b5ba50b612c69283ed3f56900477d81b1f036183a4203448f7503087e4c817ed69ac2a57a9b56ae0e522ba7f63d70cf678e98afd
|
@@ -75,12 +75,22 @@ class Hash
|
|
75
75
|
|
76
76
|
# error: nil value
|
77
77
|
if self.has_key? key and self[key] == nil
|
78
|
-
$stderr.puts "WARNING!! The value of key '#{key}' is nil
|
79
|
-
|
80
|
-
|
81
|
-
|
78
|
+
$stderr.puts "WARNING!! The value of key '#{key}' is nil."
|
79
|
+
|
80
|
+
# we put a bit of info about the top level structure of a resume to avoid extra-long error messages
|
81
|
+
# I don't want to print detailed information about top-level entries missing in the resume
|
82
|
+
top_level_entries = [
|
83
|
+
"contacts", "addresses", "web_presence", "summary", "work", "teaching", "projects", "other",
|
84
|
+
"committees", "volunteer", "visits", "education", "publications", "talks", "awards", "achievements",
|
85
|
+
"software", "skills", "languages", "driving", "interests", "references"]
|
86
|
+
if not top_level_entries.include?(key) then
|
87
|
+
$stderr.puts "Offending entry:"
|
88
|
+
# $stderr.puts self.to_s
|
89
|
+
self.keys.each do |k|
|
90
|
+
$stderr.puts "\t#{k}: #{self[k]}"
|
91
|
+
end
|
92
|
+
$stderr.puts ""
|
82
93
|
end
|
83
|
-
$stderr.puts ""
|
84
94
|
end
|
85
95
|
|
86
96
|
return self[key] if self.has_key? key
|
@@ -8,8 +8,8 @@ messaging = data.contacts.select { |x|
|
|
8
8
|
}
|
9
9
|
address = data.addresses.select { |x| x.label == "home" }.first
|
10
10
|
|
11
|
-
# make a period (2015, 2015-10, 2015-01-01 into the
|
12
|
-
def period_tod period
|
11
|
+
# make a period (2015, 2015-10, 2015-01-01 into the xml attributes day, month, year for a date tag
|
12
|
+
def self.period_tod period
|
13
13
|
el = period.to_s.split("-")
|
14
14
|
fields = ["year=\"%d\"", "month=\"--%02d\"", "day=\"---%02d\""]
|
15
15
|
el.each_with_index.map { |x, i| fields[i] % x.to_i }.join(" ")
|
@@ -55,6 +55,7 @@ end
|
|
55
55
|
<Email>
|
56
56
|
<Contact><%= email.value %></Contact>
|
57
57
|
</Email>
|
58
|
+
<% if phones %>
|
58
59
|
<TelephoneList>
|
59
60
|
<% phones.each do |phone| %>
|
60
61
|
<Telephone>
|
@@ -66,6 +67,8 @@ end
|
|
66
67
|
</Telephone>
|
67
68
|
<% end %>
|
68
69
|
</TelephoneList>
|
70
|
+
<% end %>
|
71
|
+
<% if data.web_presence %>
|
69
72
|
<WebsiteList>
|
70
73
|
<% data.web_presence.each do |web| %>
|
71
74
|
<Website>
|
@@ -77,6 +80,8 @@ end
|
|
77
80
|
</Website>
|
78
81
|
<% end %>
|
79
82
|
</WebsiteList>
|
83
|
+
<% end %>
|
84
|
+
<% if messaging and not messaging.empty? %>
|
80
85
|
<InstantMessagingList>
|
81
86
|
<% messaging.each do |im| %>
|
82
87
|
<InstantMessaging>
|
@@ -88,16 +93,18 @@ end
|
|
88
93
|
</InstantMessaging>
|
89
94
|
<% end %>
|
90
95
|
</InstantMessagingList>
|
96
|
+
<% end %>
|
91
97
|
<ContactMethodList>
|
92
98
|
<!-- other contacts not defined above -->
|
93
99
|
</ContactMethodList>
|
94
100
|
</ContactInfo>
|
95
101
|
<Demographics>
|
96
102
|
<Birthdate day="---<%= "%02d" % data.basics.birthdate.day %>" month="--<%= "%02d" % data.basics.birthdate.month %>" year="<%= data.basics.birthdate.year %>" />
|
97
|
-
|
103
|
+
<%# ["gender"] in place of .gender, so that the code does not complain about gender not being defined (being nil) %>
|
104
|
+
<% if data.basics["gender"] == "M" or data.basics["gender"] == "F" %>
|
98
105
|
<Gender>
|
99
|
-
<Code><%= data.gender %></Code>
|
100
|
-
<Label><%= data.gender == "M" ? "Male" : "Female" %></Label>
|
106
|
+
<Code><%= data.basics.gender %></Code>
|
107
|
+
<Label><%= data.basics.gender == "M" ? "Male" : "Female" %></Label>
|
101
108
|
</Gender>
|
102
109
|
<% end %>
|
103
110
|
<NationalityList>
|
@@ -130,9 +137,9 @@ end
|
|
130
137
|
<% data.work.each do |pos| %>
|
131
138
|
<WorkExperience>
|
132
139
|
<Period>
|
133
|
-
<From <%= period_tod pos.from %>/>
|
134
|
-
<% if pos
|
135
|
-
<To <%= period_tod pos.
|
140
|
+
<From <%= self.period_tod pos.from %>/>
|
141
|
+
<% if pos.till and pos.till != "" %>
|
142
|
+
<To <%= self.period_tod pos.till %>/>
|
136
143
|
<% else %>
|
137
144
|
<Current>true</Current>
|
138
145
|
<% end %>
|
@@ -175,18 +182,21 @@ end
|
|
175
182
|
</Employer>
|
176
183
|
</WorkExperience>
|
177
184
|
<% end %>
|
185
|
+
<% if data.teaching and not data.teaching.empty? %>
|
178
186
|
<% data.teaching.each do |pos| %>
|
179
187
|
<WorkExperience>
|
180
188
|
<Period>
|
181
|
-
|
182
|
-
|
183
|
-
|
189
|
+
<% if pos.from and pos.from != "" %>
|
190
|
+
<From <%= self.period_tod pos.from %>/>
|
191
|
+
<% end %>
|
192
|
+
<% if pos.till and pos.till != "" %>
|
193
|
+
<To <%= self.period_tod pos.till %>/>
|
184
194
|
<% else %>
|
185
195
|
<Current>true</Current>
|
186
196
|
<% end %>
|
187
197
|
</Period>
|
188
198
|
<!--
|
189
|
-
<
|
199
|
+
<nation>
|
190
200
|
<ReferenceTo idref="ATT_1"/>
|
191
201
|
</Documentation>
|
192
202
|
-->
|
@@ -197,7 +207,7 @@ end
|
|
197
207
|
<%= pos.summary %>
|
198
208
|
</Activities>
|
199
209
|
<Employer>
|
200
|
-
<Name><%= pos.who
|
210
|
+
<Name><%= "#{pos.who} #{pos['school'] ? pos.school : ''}" %></Name>
|
201
211
|
<% if pos["address"] %>
|
202
212
|
<ContactInfo>
|
203
213
|
<Address>
|
@@ -223,13 +233,78 @@ end
|
|
223
233
|
</Employer>
|
224
234
|
</WorkExperience>
|
225
235
|
<% end %>
|
236
|
+
<% end %>
|
237
|
+
<% if data.volunteer and not data.volunteer.empty? %>
|
238
|
+
<% data.volunteer.each do |pos| %>
|
239
|
+
<WorkExperience>
|
240
|
+
<% if pos["date"] %>
|
241
|
+
<Period>
|
242
|
+
<From <%= self.period_tod pos.date.strftime("%Y-%m-%d") %>/>
|
243
|
+
<To <%= self.period_tod pos.date.strftime("%Y-%m-%d") %>/>
|
244
|
+
</Period>
|
245
|
+
<% elsif pos.from or (pos.till and pos.till != "") %>
|
246
|
+
<Period>
|
247
|
+
<% if pos.from %>
|
248
|
+
<From <%= self.period_tod pos.from %>/>
|
249
|
+
<% end %>
|
250
|
+
<% if pos.till and pos.till != "" %>
|
251
|
+
<To <%= self.period_tod pos.till %>/>
|
252
|
+
<% else %>
|
253
|
+
<Current>true</Current>
|
254
|
+
<% end %>
|
255
|
+
</Period>
|
256
|
+
<% end %>
|
257
|
+
<!--
|
258
|
+
<ntation>
|
259
|
+
<ReferenceTo idref="ATT_1"/>
|
260
|
+
</Documentation>
|
261
|
+
-->
|
262
|
+
<Position>
|
263
|
+
<Label><%= pos.role %></Label>
|
264
|
+
</Position>
|
265
|
+
<Activities>
|
266
|
+
<%= pos.summary %>
|
267
|
+
</Activities>
|
268
|
+
<Employer>
|
269
|
+
<Name><%= pos.who %></Name>
|
270
|
+
<% if pos["address"] %>
|
271
|
+
<ContactInfo>
|
272
|
+
<Address>
|
273
|
+
<Contact>
|
274
|
+
<AddressLine><%= pos.address %></AddressLine>
|
275
|
+
<!-- <Country>
|
276
|
+
<Code></Code>
|
277
|
+
<Label></Label>
|
278
|
+
</Country> -->
|
279
|
+
</Contact>
|
280
|
+
</Address>
|
281
|
+
<Website>
|
282
|
+
<Contact><%= pos["website"] %></Contact>
|
283
|
+
</Website>
|
284
|
+
</ContactInfo>
|
285
|
+
<!--
|
286
|
+
<Sector>
|
287
|
+
<Code></Code>
|
288
|
+
<Label></Label>
|
289
|
+
</Sector>
|
290
|
+
-->
|
291
|
+
<% end %>
|
292
|
+
</Employer>
|
293
|
+
</WorkExperience>
|
294
|
+
<% end %>
|
295
|
+
<% end %>
|
226
296
|
</WorkExperienceList>
|
297
|
+
<% if data.education and not data.education.empty? %>
|
227
298
|
<EducationList>
|
228
299
|
<% data.education.select { |x| x.publish }.each do |edu| %>
|
229
300
|
<Education>
|
230
301
|
<Period>
|
231
|
-
|
232
|
-
|
302
|
+
<% if edu.from and not edu.from == "" %>
|
303
|
+
<From <%= self.period_tod edu.from %>/>
|
304
|
+
<% end %>
|
305
|
+
<% if edu.till and not edu.till == "" %>
|
306
|
+
<To <%= self.period_tod edu.till %>/>
|
307
|
+
<% end %>
|
233
308
|
</Period>
|
234
309
|
<!--
|
235
310
|
<Documentation>
|
@@ -257,12 +332,13 @@ end
|
|
257
332
|
</Education>
|
258
333
|
<% end %>
|
259
334
|
</EducationList>
|
335
|
+
<% end %>
|
260
336
|
<Skills>
|
261
337
|
<% if data.languages %>
|
262
338
|
<Linguistic>
|
263
|
-
<% if data.mother_tongues %>
|
339
|
+
<% if data.languages.mother_tongues and not data.languages.mother_tongues.empty? %>
|
264
340
|
<MotherTongueList>
|
265
|
-
<% data.mother_tongues.each do |mt| %>
|
341
|
+
<% data.languages.mother_tongues.each do |mt| %>
|
266
342
|
<MotherTongue>
|
267
343
|
<Description>
|
268
344
|
<Code><%= mt.code %></Code>
|
@@ -272,12 +348,13 @@ end
|
|
272
348
|
<% end %>
|
273
349
|
</MotherTongueList>
|
274
350
|
<% end %>
|
275
|
-
<% if data.foreign %>
|
351
|
+
<% if data.languages.foreign and not data.languages.foreign.empty? %>
|
276
352
|
<ForeignLanguageList>
|
277
|
-
<% data.foreign.each do |language| %>
|
353
|
+
<% data.languages.foreign.each do |language| %>
|
278
354
|
<ForeignLanguage>
|
279
355
|
<Description>
|
280
|
-
<Code><%= language.code %></Code
|
356
|
+
<Code><%= language.code %></Code>
|
357
|
+
<Label><%= language.language %></Label>
|
281
358
|
</Description>
|
282
359
|
<ProficiencyLevel>
|
283
360
|
<Listening>
|
@@ -324,7 +401,7 @@ end
|
|
324
401
|
<Documentation></Documentation>
|
325
402
|
</Computer>
|
326
403
|
-->
|
327
|
-
<% if data.driving %>
|
404
|
+
<% if data.driving and not data.driving.empty? %>
|
328
405
|
<Driving>
|
329
406
|
<Description>
|
330
407
|
<% data.driving.each do |license| %>
|
@@ -335,17 +412,14 @@ end
|
|
335
412
|
<% end %>
|
336
413
|
<Other>
|
337
414
|
<Description>
|
338
|
-
<%
|
339
|
-
|
340
|
-
<p><b>Volunteering Work</b></p>
|
341
|
-
<% data.volunteer.each do |v| %>
|
342
|
-
|
343
|
-
<% end %>
|
415
|
+
<% if data.interests and not data.interests.empty? %>
|
416
|
+
<%= data.interests.map { |x| (x.name || "") + ": " + (x.level || "") + ", " + (x.summary || "") + "; " }.join(", ") %>
|
344
417
|
<% end %>
|
345
418
|
</Description>
|
346
419
|
</Other>
|
347
420
|
</Skills>
|
348
421
|
<AchievementList>
|
422
|
+
<% if data.awards and not data.awards.empty? %>
|
349
423
|
<% data.awards.each do |award| %>
|
350
424
|
<Achievement>
|
351
425
|
<Title>
|
@@ -357,6 +431,8 @@ end
|
|
357
431
|
</Description>
|
358
432
|
</Achievement>
|
359
433
|
<% end %>
|
434
|
+
<% end %>
|
435
|
+
<% if data.achievements and not data.achievements.empty? %>
|
360
436
|
<% data.achievements.each do |achievement| %>
|
361
437
|
<Achievement>
|
362
438
|
<Title>
|
@@ -368,7 +444,8 @@ end
|
|
368
444
|
</Description>
|
369
445
|
</Achievement>
|
370
446
|
<% end %>
|
371
|
-
<%
|
447
|
+
<% end %>
|
448
|
+
<% if data.projects and not data.projects.empty? %>
|
372
449
|
<Achievement>
|
373
450
|
<Title>
|
374
451
|
<Code>projects</Code>
|
@@ -381,7 +458,7 @@ end
|
|
381
458
|
</Description>
|
382
459
|
</Achievement>
|
383
460
|
<% end %>
|
384
|
-
<% if data.publications %>
|
461
|
+
<% if data.publications and not data.publications.empty? %>
|
385
462
|
<Achievement>
|
386
463
|
<Title>
|
387
464
|
<Code>publications</Code>
|
@@ -1,113 +1,111 @@
|
|
1
1
|
# <%= data.basics.first_name + " " + data.basics.last_name %>, <%= data.basics.title %>
|
2
|
-
<%
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
%><% (0..self.max(address.size, presence.size)).each do |i| %>
|
9
|
-
<%= "|%-34s | %38s |" % [address[i] || "", presence[i] || ""] %><% end %>
|
2
|
+
<%
|
3
|
+
addresses = data.addresses.map { |x| "**#{x.label}**: #{x.street}, #{x.zip_code} #{x.city}" }
|
4
|
+
presence = data.contacts.map { |x| "**#{x.label}:** #{x.value}" } + data.web_presence.map { |x| "<" + x.value + ">" }
|
5
|
+
%>
|
6
|
+
<%= presence.map { |x| "* #{x}" }.join("\n") %>
|
7
|
+
<%= addresses.map { |x| "* #{x}" }.join("\n") %>
|
10
8
|
|
11
9
|
## Summary
|
12
10
|
<% reflow(data.summary, 78).each do |string| %>
|
13
|
-
|
11
|
+
<%= string %><% end %>
|
14
12
|
|
15
13
|
<% if data.skills %>## Skills
|
16
14
|
|
17
15
|
<% (data.skills || []).each do |item| %>
|
18
|
-
|
19
|
-
<% end
|
16
|
+
- <%= item.name %> <%= item.level %>
|
17
|
+
<% end %>
|
20
18
|
|
21
|
-
<% if data.experience %>## Experience
|
19
|
+
<% end %><% if data.experience %>## Experience
|
22
20
|
<% (data.work || []).each do |exp| %>
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
- **<%= clean((exp.role ? exp.role + ", " : "") + " " + (exp.who || "") ) %>**
|
22
|
+
<%= exp.from %> -- <%= exp.till ? exp.till : "today " %>
|
23
|
+
<% reflow(exp.summary, 72).each do |string| %>
|
24
|
+
<%= string %><% end %>
|
27
25
|
<% end %><% end %>
|
28
26
|
|
29
27
|
<% if data.teaching %>## Teaching
|
30
28
|
<% (data.teaching || []).each do |item| %>
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
- **<%= item.role %>, <%= item.who %>**
|
30
|
+
<%= item.from %> -- <%= item.till ? item.till : "today " %>
|
31
|
+
<%= item.subject %> <%= ("(" + item["school"] + ")") if item["school"] %>
|
34
32
|
<% end %><% end %>
|
35
33
|
|
36
34
|
<% if data.projects %>## Projects
|
37
35
|
<% (data.projects || []).each do |item| %>
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
- <%= item.name %>, <%= item.role %>
|
37
|
+
<%= item.from %> -- <%= item.till %> <% reflow(item.summary, 72).each do |line| %>
|
38
|
+
<%= line %><% end %>
|
41
39
|
<% end %><% end %>
|
42
40
|
|
43
41
|
<% if data.other %>## Other Initiatives
|
44
42
|
<% (data.other || []).each do |item| %>
|
45
|
-
|
46
|
-
|
47
|
-
|
43
|
+
- <%= item.who %>, <%= item.role %>
|
44
|
+
<%= item.from %> -- <%= item.till %> <% reflow(item.summary, 72).each do |line| %>
|
45
|
+
<%= line %><% end %>
|
48
46
|
<% end %><% end %>
|
49
47
|
|
50
48
|
<% if data.committees %>## Committees
|
51
49
|
<% (data.committees || []).each do |item| %>
|
52
|
-
|
53
|
-
|
50
|
+
- <%= item.who %>, <%= item.role %> <%= item.editions %>
|
51
|
+
<%= item.url %>
|
54
52
|
<% end %><% end %>
|
55
53
|
|
56
54
|
<% if data.volunteer %>## Volunteer
|
57
55
|
<% (data.volunteer || []).each do |item| %>
|
58
|
-
|
59
|
-
|
60
|
-
|
56
|
+
- <%= item.who %>, <%= item.role %>
|
57
|
+
<%= item.from %> -- <%= item.till %> <% reflow(item.summary, 72).each do |line| %>
|
58
|
+
<%= line %><% end %>
|
61
59
|
<% end %><% end %>
|
62
60
|
|
63
61
|
<% if data.publications %>## Publications
|
64
62
|
<% (data.publications || []).each do |item| %>
|
65
|
-
|
63
|
+
- <%= item.authors %>, *"<%= item.title %>"* <%= item.publisher %>, <%= item.date %>
|
66
64
|
<% end %><% end %>
|
67
65
|
|
68
66
|
<% if data.talks %>## Talks
|
69
67
|
<% (data.talks || []).each do |item| %>
|
70
|
-
|
71
|
-
|
68
|
+
- *<%= item.title %>*
|
69
|
+
<%= item.venue %> (<%= item.date %>)
|
72
70
|
<% end %><% end %>
|
73
71
|
|
74
72
|
<% if data.visits %>## Visits
|
75
73
|
<% (data.visits || []).each do |item| %>
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
- **<%= item.role %> **<%= item.who %>, <%= item.address %>**
|
75
|
+
<%= item.from %> -- <%= item.till %><% reflow(item.summary, 72).each do |line| %>
|
76
|
+
<%= line %><% end %>
|
79
77
|
<% end %><% end %>
|
80
78
|
|
81
79
|
<% if data.education %>## Education
|
82
80
|
<% data.education.select { |x| x.publish }.each do |school| %>
|
83
|
-
|
84
|
-
|
85
|
-
|
81
|
+
<%= year(school["till"]) %>
|
82
|
+
: <%= school.degree if school.degree %> <%= school.school %>,
|
83
|
+
<%= school.address if school.address %>
|
86
84
|
<% end %><% end %>
|
87
85
|
|
88
86
|
<% if data.awards %>## Awards
|
89
87
|
<% (data.awards || []).each do |item| %>
|
90
|
-
|
91
|
-
|
88
|
+
- <%= item.date %>, <%= item.who %> *<%= item.title %>*, <%= item.where %><% reflow(item.summary, 72).each do |line| %>
|
89
|
+
<%= line %><% end %>
|
92
90
|
<% end %><% end %>
|
93
91
|
|
94
92
|
<% if data.achievements %>
|
95
93
|
## Achievements
|
96
94
|
<% (data.achievements || []).each do |item| %>
|
97
|
-
|
98
|
-
|
95
|
+
- <%= item.date %>, <%= item.who %> *<%= item.title %>*, <%= item.where %><% reflow(item.summary, 72).each do |line| %>
|
96
|
+
<%= line %><% end %>
|
99
97
|
<% end %><% end %>
|
100
98
|
|
101
99
|
<% if data.software %>## Software
|
102
100
|
<% (data.software || []).each do |item| %>
|
103
|
-
|
104
|
-
|
101
|
+
- <%= item.title %> (<%= item.role %>)
|
102
|
+
<%= item.url %>
|
105
103
|
<% end %><% end %>
|
106
104
|
|
107
105
|
<% if data.interests %>## Interests
|
108
106
|
<% (data.interests || []).each do |item| %>
|
109
|
-
|
110
|
-
|
107
|
+
- <%= item.name %> <%= item.level %><% reflow(item.summary, 72).each do |line| %>
|
108
|
+
<%= line %><% end %>
|
111
109
|
<% end %><% end %>
|
112
110
|
|
113
111
|
<% if data.languages %>## Languages
|
@@ -116,5 +114,5 @@ Mother Tongue(s): <%= data.languages.mother_tongues.map { |x| x.language }.join(
|
|
116
114
|
<% end %>
|
117
115
|
<% if data.languages.foreign %>Other Languages(s):
|
118
116
|
<% data.languages.foreign.each do |x| %>
|
119
|
-
|
117
|
+
- <%= x.language %>: <%= x.level %>
|
120
118
|
<% end %><% end %><% end %>
|