resme 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.org +32 -35
- data/exe/resme +2 -2
- data/lib/resme/cli/command_semantics.rb +96 -94
- data/lib/resme/cli/command_syntax.rb +223 -204
- data/lib/resme/renderer/renderer.rb +20 -18
- data/lib/resme/templates/resume.md.erb +3 -3
- data/lib/resme/templates/resume.org.erb +9 -7
- data/lib/resme/templates/resume.xml.erb +495 -0
- data/lib/resme/version.rb +1 -1
- data/resme.gemspec +2 -3
- metadata +6 -20
- data/lib/resme/templates/europass/eu.xml.erb +0 -491
@@ -1,491 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
email = data.contacts.select { |x| x.label == "email" }.first
|
3
|
-
phones = data.contacts.select { |x|
|
4
|
-
["phone", "mobile", "cell"].include?(x.label)
|
5
|
-
}
|
6
|
-
messaging = data.contacts.select { |x|
|
7
|
-
["skype", "gtalk", "telegram", "whatsup"].include?(x.label)
|
8
|
-
}
|
9
|
-
address = data.addresses.select { |x| x.label == "home" }.first
|
10
|
-
|
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
|
-
el = period.to_s.split("-")
|
14
|
-
fields = ["year=\"%d\"", "month=\"--%02d\"", "day=\"---%02d\""]
|
15
|
-
el.each_with_index.map { |x, i| fields[i] % x.to_i }.join(" ")
|
16
|
-
end
|
17
|
-
|
18
|
-
|
19
|
-
-%>
|
20
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
21
|
-
<SkillsPassport xmlns="http://europass.cedefop.europa.eu/Europass" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://europass.cedefop.europa.eu/Europass http://europass.cedefop.europa.eu/xml/v3.3.0/EuropassSchema.xsd" locale="en">
|
22
|
-
<DocumentInfo>
|
23
|
-
<DocumentType>ECV</DocumentType>
|
24
|
-
<Bundle></Bundle>
|
25
|
-
<CreationDate><%= DateTime.now.iso8601 %></CreationDate>
|
26
|
-
<LastUpdateDate><%= DateTime.now.iso8601 %></LastUpdateDate>
|
27
|
-
<XSDVersion>V3.3</XSDVersion>
|
28
|
-
<Generator>resume.rb</Generator>
|
29
|
-
<Comment></Comment>
|
30
|
-
<Copyright>© European Communities | http://europass.cedefop.europa.eu</Copyright>
|
31
|
-
<EuropassLogo>false</EuropassLogo>
|
32
|
-
</DocumentInfo>
|
33
|
-
<!-- <PrintingPreferences> </PrintingPreferences> -->
|
34
|
-
<LearnerInfo>
|
35
|
-
<Identification>
|
36
|
-
<PersonName>
|
37
|
-
<Title>
|
38
|
-
<Code>dr</Code>
|
39
|
-
<Label><%= data.basics.title %></Label>
|
40
|
-
</Title>
|
41
|
-
<FirstName><%= data.basics.first_name %></FirstName>
|
42
|
-
<Surname><%= data.basics.last_name %></Surname>
|
43
|
-
</PersonName>
|
44
|
-
<ContactInfo>
|
45
|
-
<Address>
|
46
|
-
<Contact>
|
47
|
-
<AddressLine><%= address.street %></AddressLine>
|
48
|
-
<PostalCode><%= address.zip_code %></PostalCode>
|
49
|
-
<Municipality><%= address.city %></Municipality>
|
50
|
-
<Country>
|
51
|
-
<Code><%= address.country[0..1].upcase %></Code>
|
52
|
-
<Label><%= address.country %></Label>
|
53
|
-
</Country>
|
54
|
-
</Contact>
|
55
|
-
</Address>
|
56
|
-
<Email>
|
57
|
-
<Contact><%= email.value %></Contact>
|
58
|
-
</Email>
|
59
|
-
<% if phones %>
|
60
|
-
<TelephoneList>
|
61
|
-
<% phones.each do |phone| %>
|
62
|
-
<Telephone>
|
63
|
-
<Contact><%= phone.value %></Contact>
|
64
|
-
<Use>
|
65
|
-
<Code><%= phone.label %></Code>
|
66
|
-
<Label><%= phone.value %></Label>
|
67
|
-
</Use>
|
68
|
-
</Telephone>
|
69
|
-
<% end %>
|
70
|
-
</TelephoneList>
|
71
|
-
<% end %>
|
72
|
-
<% if data.web_presence %>
|
73
|
-
<WebsiteList>
|
74
|
-
<% data.web_presence.each do |web| %>
|
75
|
-
<Website>
|
76
|
-
<Contact><%= web.value %></Contact>
|
77
|
-
<Use>
|
78
|
-
<!-- <Code><%= web.label %></Code> -->
|
79
|
-
<Label><%= web.label.capitalize %></Label>
|
80
|
-
</Use>
|
81
|
-
</Website>
|
82
|
-
<% end %>
|
83
|
-
</WebsiteList>
|
84
|
-
<% end %>
|
85
|
-
<% if messaging and not messaging.empty? %>
|
86
|
-
<InstantMessagingList>
|
87
|
-
<% messaging.each do |im| %>
|
88
|
-
<InstantMessaging>
|
89
|
-
<Contact><%= im.value %></Contact>
|
90
|
-
<Use>
|
91
|
-
<!-- <Code><%= im.label %></Code> -->
|
92
|
-
<Label><%= im.label.capitalize %></Label>
|
93
|
-
</Use>
|
94
|
-
</InstantMessaging>
|
95
|
-
<% end %>
|
96
|
-
</InstantMessagingList>
|
97
|
-
<% end %>
|
98
|
-
<ContactMethodList>
|
99
|
-
<!-- other contacts not defined above -->
|
100
|
-
</ContactMethodList>
|
101
|
-
</ContactInfo>
|
102
|
-
<Demographics>
|
103
|
-
<Birthdate day="---<%= "%02d" % data.basics.birthdate.day %>" month="--<%= "%02d" % data.basics.birthdate.month %>" year="<%= data.basics.birthdate.year %>" />
|
104
|
-
<%# ["gender"] in place of .gender, so that the code does not complain about gender not being defined (being nil) %>
|
105
|
-
<% if data.basics["gender"] == "M" or data.basics["gender"] == "F" %>
|
106
|
-
<Gender>
|
107
|
-
<Code><%= data.basics.gender %></Code>
|
108
|
-
<Label><%= data.basics.gender == "M" ? "Male" : "Female" %></Label>
|
109
|
-
</Gender>
|
110
|
-
<% end %>
|
111
|
-
<NationalityList>
|
112
|
-
<Nationality>
|
113
|
-
<Label><%= data.basics.nationality %></Label>
|
114
|
-
</Nationality>
|
115
|
-
</NationalityList>
|
116
|
-
<!--
|
117
|
-
<Photo>
|
118
|
-
<MimeType>image/jpeg</MimeType>
|
119
|
-
<Data></Data>
|
120
|
-
<MetadataList>
|
121
|
-
<Metadata key="photo-dimensions" value="100x110"/>
|
122
|
-
</MetadataList>
|
123
|
-
</Photo>
|
124
|
-
<Signature>
|
125
|
-
<MimeType>image/jpeg</MimeType>
|
126
|
-
<Data></Data>
|
127
|
-
<MetadataList>
|
128
|
-
<Metadata key="signature-dimensions" value="250x150" />
|
129
|
-
</MetadataList>
|
130
|
-
</Signature>
|
131
|
-
-->
|
132
|
-
</Demographics>
|
133
|
-
</Identification>
|
134
|
-
<Headline>
|
135
|
-
<Description><Label><%= data.summary %></Label></Description>
|
136
|
-
</Headline>
|
137
|
-
<WorkExperienceList>
|
138
|
-
<% data.work.each do |pos| %>
|
139
|
-
<WorkExperience>
|
140
|
-
<Period>
|
141
|
-
<From <%= self.period_tod pos.from %>/>
|
142
|
-
<% if pos.till and pos.till != "" %>
|
143
|
-
<To <%= self.period_tod pos.till %>/>
|
144
|
-
<% else %>
|
145
|
-
<Current>true</Current>
|
146
|
-
<% end %>
|
147
|
-
</Period>
|
148
|
-
<!--
|
149
|
-
<Documentation>
|
150
|
-
<ReferenceTo idref="ATT_1"/>
|
151
|
-
</Documentation>
|
152
|
-
-->
|
153
|
-
<Position>
|
154
|
-
<Label><%= pos.role %></Label>
|
155
|
-
</Position>
|
156
|
-
<Activities>
|
157
|
-
<%= pos.summary %>
|
158
|
-
</Activities>
|
159
|
-
<Employer>
|
160
|
-
<Name><%= pos["who"] ? pos.who : "" %></Name>
|
161
|
-
<% if pos["address"] %>
|
162
|
-
<ContactInfo>
|
163
|
-
<Address>
|
164
|
-
<Contact>
|
165
|
-
<AddressLine><%= pos.address %></AddressLine>
|
166
|
-
<!-- <Country>
|
167
|
-
<Code></Code>
|
168
|
-
<Label></Label>
|
169
|
-
</Country> -->
|
170
|
-
</Contact>
|
171
|
-
</Address>
|
172
|
-
<Website>
|
173
|
-
<Contact><%= pos.website %></Contact>
|
174
|
-
</Website>
|
175
|
-
</ContactInfo>
|
176
|
-
<!--
|
177
|
-
<Sector>
|
178
|
-
<Code></Code>
|
179
|
-
<Label></Label>
|
180
|
-
</Sector>
|
181
|
-
-->
|
182
|
-
<% end %>
|
183
|
-
</Employer>
|
184
|
-
</WorkExperience>
|
185
|
-
<% end %>
|
186
|
-
<% if data.teaching and not data.teaching.empty? %>
|
187
|
-
<% data.teaching.each do |pos| %>
|
188
|
-
<WorkExperience>
|
189
|
-
<Period>
|
190
|
-
<% if pos.from and pos.from != "" %>
|
191
|
-
<From <%= self.period_tod pos.from %>/>
|
192
|
-
<% end %>
|
193
|
-
<% if pos.till and pos.till != "" %>
|
194
|
-
<To <%= self.period_tod pos.till %>/>
|
195
|
-
<% else %>
|
196
|
-
<Current>true</Current>
|
197
|
-
<% end %>
|
198
|
-
</Period>
|
199
|
-
<!--
|
200
|
-
<nation>
|
201
|
-
<ReferenceTo idref="ATT_1"/>
|
202
|
-
</Documentation>
|
203
|
-
-->
|
204
|
-
<Position>
|
205
|
-
<Label><%= pos.role %></Label>
|
206
|
-
</Position>
|
207
|
-
<Activities>
|
208
|
-
<%= pos.summary %>
|
209
|
-
</Activities>
|
210
|
-
<Employer>
|
211
|
-
<Name><%= "#{pos.who} #{pos['school'] ? pos.school : ''}" %></Name>
|
212
|
-
<% if pos["address"] %>
|
213
|
-
<ContactInfo>
|
214
|
-
<Address>
|
215
|
-
<Contact>
|
216
|
-
<AddressLine><%= pos.address %></AddressLine>
|
217
|
-
<!-- <Country>
|
218
|
-
<Code></Code>
|
219
|
-
<Label></Label>
|
220
|
-
</Country> -->
|
221
|
-
</Contact>
|
222
|
-
</Address>
|
223
|
-
<Website>
|
224
|
-
<Contact><%= pos["website"] %></Contact>
|
225
|
-
</Website>
|
226
|
-
</ContactInfo>
|
227
|
-
<!--
|
228
|
-
<Sector>
|
229
|
-
<Code></Code>
|
230
|
-
<Label></Label>
|
231
|
-
</Sector>
|
232
|
-
-->
|
233
|
-
<% end %>
|
234
|
-
</Employer>
|
235
|
-
</WorkExperience>
|
236
|
-
<% end %>
|
237
|
-
<% end %>
|
238
|
-
<% if data.volunteer and not data.volunteer.empty? %>
|
239
|
-
<% data.volunteer.each do |pos| %>
|
240
|
-
<WorkExperience>
|
241
|
-
<% if pos["date"] %>
|
242
|
-
<Period>
|
243
|
-
<From <%= self.period_tod pos.date.strftime("%Y-%m-%d") %>/>
|
244
|
-
<To <%= self.period_tod pos.date.strftime("%Y-%m-%d") %>/>
|
245
|
-
</Period>
|
246
|
-
<% elsif pos.from or (pos.till and pos.till != "") %>
|
247
|
-
<Period>
|
248
|
-
<% if pos.from %>
|
249
|
-
<From <%= self.period_tod pos.from %>/>
|
250
|
-
<% end %>
|
251
|
-
<% if pos.till and pos.till != "" %>
|
252
|
-
<To <%= self.period_tod pos.till %>/>
|
253
|
-
<% else %>
|
254
|
-
<Current>true</Current>
|
255
|
-
<% end %>
|
256
|
-
</Period>
|
257
|
-
<% end %>
|
258
|
-
<!--
|
259
|
-
<ntation>
|
260
|
-
<ReferenceTo idref="ATT_1"/>
|
261
|
-
</Documentation>
|
262
|
-
-->
|
263
|
-
<Position>
|
264
|
-
<Label><%= pos.role %></Label>
|
265
|
-
</Position>
|
266
|
-
<Activities>
|
267
|
-
<%= pos.summary %>
|
268
|
-
</Activities>
|
269
|
-
<Employer>
|
270
|
-
<Name><%= pos.who %></Name>
|
271
|
-
<% if pos["address"] %>
|
272
|
-
<ContactInfo>
|
273
|
-
<Address>
|
274
|
-
<Contact>
|
275
|
-
<AddressLine><%= pos.address %></AddressLine>
|
276
|
-
<!-- <Country>
|
277
|
-
<Code></Code>
|
278
|
-
<Label></Label>
|
279
|
-
</Country> -->
|
280
|
-
</Contact>
|
281
|
-
</Address>
|
282
|
-
<Website>
|
283
|
-
<Contact><%= pos["website"] %></Contact>
|
284
|
-
</Website>
|
285
|
-
</ContactInfo>
|
286
|
-
<!--
|
287
|
-
<Sector>
|
288
|
-
<Code></Code>
|
289
|
-
<Label></Label>
|
290
|
-
</Sector>
|
291
|
-
-->
|
292
|
-
<% end %>
|
293
|
-
</Employer>
|
294
|
-
</WorkExperience>
|
295
|
-
<% end %>
|
296
|
-
<% end %>
|
297
|
-
</WorkExperienceList>
|
298
|
-
<% if data.education and not data.education.empty? %>
|
299
|
-
<EducationList>
|
300
|
-
<% data.education.select { |x| x.publish }.each do |edu| %>
|
301
|
-
<Education>
|
302
|
-
<Period>
|
303
|
-
<% if edu.from and not edu.from == "" %>
|
304
|
-
<From <%= self.period_tod edu.from %>/>
|
305
|
-
<% end %>
|
306
|
-
<% if edu.till and not edu.till == "" %>
|
307
|
-
<To <%= self.period_tod edu.till %>/>
|
308
|
-
<% end %>
|
309
|
-
</Period>
|
310
|
-
<!--
|
311
|
-
<Documentation>
|
312
|
-
<ReferenceTo idref="ATT_1"/>
|
313
|
-
<ReferenceTo idref="ATT_2"/>
|
314
|
-
</Documentation>
|
315
|
-
-->
|
316
|
-
<Title><%= edu.degree %></Title>
|
317
|
-
<Activities></Activities>
|
318
|
-
<Organisation>
|
319
|
-
<Name><%= edu["school"] %></Name>
|
320
|
-
<ContactInfo>
|
321
|
-
<Address>
|
322
|
-
<Contact>
|
323
|
-
<AddressLine><%= edu.address %></AddressLine>
|
324
|
-
<!-- <Country>
|
325
|
-
<Code>US</Code>
|
326
|
-
<Label>United States</Label>
|
327
|
-
</Country>
|
328
|
-
-->
|
329
|
-
</Contact>
|
330
|
-
</Address>
|
331
|
-
</ContactInfo>
|
332
|
-
</Organisation>
|
333
|
-
</Education>
|
334
|
-
<% end %>
|
335
|
-
</EducationList>
|
336
|
-
<% end %>
|
337
|
-
<Skills>
|
338
|
-
<% if data.languages %>
|
339
|
-
<Linguistic>
|
340
|
-
<% if data.languages.mother_tongues and not data.languages.mother_tongues.empty? %>
|
341
|
-
<MotherTongueList>
|
342
|
-
<% data.languages.mother_tongues.each do |mt| %>
|
343
|
-
<MotherTongue>
|
344
|
-
<Description>
|
345
|
-
<Code><%= mt.code %></Code>
|
346
|
-
<Label><% mt.language %></Label>
|
347
|
-
</Description>
|
348
|
-
</MotherTongue>
|
349
|
-
<% end %>
|
350
|
-
</MotherTongueList>
|
351
|
-
<% end %>
|
352
|
-
<% if data.languages.foreign and not data.languages.foreign.empty? %>
|
353
|
-
<ForeignLanguageList>
|
354
|
-
<% data.languages.foreign.each do |language| %>
|
355
|
-
<ForeignLanguage>
|
356
|
-
<Description>
|
357
|
-
<Code><%= language.code %></Code>
|
358
|
-
<Label><%= language.language %></Label>
|
359
|
-
</Description>
|
360
|
-
<ProficiencyLevel>
|
361
|
-
<Listening>
|
362
|
-
<%= language.listening.upcase %>
|
363
|
-
</Listening>
|
364
|
-
<Reading>
|
365
|
-
<%= language.reading.upcase %>
|
366
|
-
</Reading>
|
367
|
-
<SpokenInteraction>
|
368
|
-
<%= language.spoken_interaction.upcase %>
|
369
|
-
</SpokenInteraction>
|
370
|
-
<SpokenProduction>
|
371
|
-
<%= language.spoken_production.upcase %>
|
372
|
-
</SpokenProduction>
|
373
|
-
<Writing>
|
374
|
-
<%= language.writing.upcase %>
|
375
|
-
</Writing>
|
376
|
-
</ProficiencyLevel>
|
377
|
-
</ForeignLanguage>
|
378
|
-
<% end %>
|
379
|
-
</ForeignLanguageList>
|
380
|
-
<% end %>
|
381
|
-
</Linguistic>
|
382
|
-
<% end %>
|
383
|
-
<!--
|
384
|
-
<Communication>
|
385
|
-
<Description></Description>
|
386
|
-
<Documentation></Documentation>
|
387
|
-
</Communication>
|
388
|
-
<Organisational>
|
389
|
-
<Description></Description>
|
390
|
-
<Documentation></Documentation>
|
391
|
-
</Organisational>
|
392
|
-
<JobRelated>
|
393
|
-
<Description></Description>
|
394
|
-
<Documentation></Documentation>
|
395
|
-
</JobRelated>
|
396
|
-
<Computer>
|
397
|
-
<Description></Description>
|
398
|
-
<ProficiencyLevel></ProficiencyLevel>
|
399
|
-
<VerifiedBy>
|
400
|
-
<Certificate><Title></Title></Certificate>
|
401
|
-
</VerifiedBy>
|
402
|
-
<Documentation></Documentation>
|
403
|
-
</Computer>
|
404
|
-
-->
|
405
|
-
<% if data.driving and not data.driving.empty? %>
|
406
|
-
<Driving>
|
407
|
-
<Description>
|
408
|
-
<% data.driving.each do |license| %>
|
409
|
-
<Licence><%= license.license %></Licence>
|
410
|
-
<% end %>
|
411
|
-
</Description>
|
412
|
-
</Driving>
|
413
|
-
<% end %>
|
414
|
-
<Other>
|
415
|
-
<Description>
|
416
|
-
<% if data.interests and not data.interests.empty? %>
|
417
|
-
<ul>
|
418
|
-
<% data.interests do |x| %>
|
419
|
-
<li><%= "#{x.name || ""}: #{x.level || ""}, #{x.summary || ""}; " %></li>
|
420
|
-
<% end %>
|
421
|
-
</ul>
|
422
|
-
<% end %>
|
423
|
-
</Description>
|
424
|
-
</Other>
|
425
|
-
</Skills>
|
426
|
-
<AchievementList>
|
427
|
-
<% if data.awards and not data.awards.empty? %>
|
428
|
-
<% data.awards.each do |award| %>
|
429
|
-
<Achievement>
|
430
|
-
<Title>
|
431
|
-
<Label><%= award.title %></Label>
|
432
|
-
</Title>
|
433
|
-
<Description>
|
434
|
-
<%= award.summary %>
|
435
|
-
(<%= achievement.who %>, <%= achievement.where %>, <%= achievement.date %>)
|
436
|
-
</Description>
|
437
|
-
</Achievement>
|
438
|
-
<% end %>
|
439
|
-
<% end %>
|
440
|
-
<% if data.achievements and not data.achievements.empty? %>
|
441
|
-
<% data.achievements.each do |achievement| %>
|
442
|
-
<Achievement>
|
443
|
-
<Title>
|
444
|
-
<Label><%= achievement.title %></Label>
|
445
|
-
</Title>
|
446
|
-
<Description>
|
447
|
-
<%= achievement.summary %>
|
448
|
-
(<%= achievement.who %>, <%= achievement.where %>, <%= achievement.date %>)
|
449
|
-
</Description>
|
450
|
-
</Achievement>
|
451
|
-
<% end %>
|
452
|
-
<% end %>
|
453
|
-
<% if data.projects and not data.projects.empty? %>
|
454
|
-
<Achievement>
|
455
|
-
<Title>
|
456
|
-
<Code>projects</Code>
|
457
|
-
<Label>Projects</Label>
|
458
|
-
</Title>
|
459
|
-
<Description>
|
460
|
-
<ul>
|
461
|
-
<% data.projects.each do |x| %>
|
462
|
-
</li> <%= "#{x.name} (#{x.who}): #{x.role} (#{x.from}--#{x.till})" %> </li>
|
463
|
-
<% end %>
|
464
|
-
</ul>
|
465
|
-
</Description>
|
466
|
-
</Achievement>
|
467
|
-
<% end %>
|
468
|
-
<% if data.publications and not data.publications.empty? %>
|
469
|
-
<Achievement>
|
470
|
-
<Title>
|
471
|
-
<Code>publications</Code>
|
472
|
-
<Label>Publications</Label>
|
473
|
-
</Title>
|
474
|
-
<Description>
|
475
|
-
<ul>
|
476
|
-
<% data.publications.each do |x| %>
|
477
|
-
<li> <%= "#{x.title}, #{x.authors}, #{x.publisher}, #{x.date}" %> </li>
|
478
|
-
<% end %>
|
479
|
-
</ul>
|
480
|
-
</Description>
|
481
|
-
</Achievement>
|
482
|
-
<% end %>
|
483
|
-
</AchievementList>
|
484
|
-
<Documentation>
|
485
|
-
</Documentation>
|
486
|
-
</LearnerInfo>
|
487
|
-
<!--
|
488
|
-
<AttachmentList>
|
489
|
-
</AttachmentList>
|
490
|
-
-->
|
491
|
-
</SkillsPassport>
|