resme 0.3.1 → 0.5.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.
data/README.md DELETED
@@ -1,192 +0,0 @@
1
- # RESME - A Resume Generator
2
-
3
- Keep your resume in YAML and output it in various formats, including
4
- org-mode, markdown, json, and the Europass XML format.
5
-
6
- The rendering engine is based on ERB. This simplifies the creation of
7
- new output formats (and extending/modifying the YML structure to
8
- one's needs).
9
-
10
- ## Installation
11
-
12
- Add this line to your application's Gemfile:
13
-
14
- ```ruby
15
- gem 'resme'
16
- ```
17
-
18
- And then execute:
19
-
20
- $ bundle
21
-
22
- Or install it yourself as:
23
-
24
- $ gem install resme
25
-
26
- ## Usage
27
-
28
- Start with:
29
-
30
- $ resme init
31
-
32
- whih generates a YML template for your resume in the current
33
- directory. Comments in the YML file should help you fill the various
34
- entries. Notice that most entries are optional and you can remove
35
- sections which are not relevant for your resume.
36
-
37
- You can then generate a resume using one of the existing templates or
38
- by writing your own template (see below).
39
-
40
- To generate a resume in Markdown using the provided template:
41
-
42
- $ resme org [-o output_filename] file.yml ...
43
-
44
- To generate a resume in Markdown using the provided template:
45
-
46
- $ resme md [-o output_filename] file.yml ...
47
-
48
- To generate a resume in the Europass XML format using the provided template:
49
-
50
- $ resme europass [-o output_filename] file.yml ...
51
-
52
- To generate a resume in the JSON format (https://jsonresume.org/):
53
-
54
- $ resme json [-o output_filename] file.yaml ...
55
-
56
- Remarks:
57
-
58
- * you can specify more than one YML file in input. This allows you to store
59
- data about your resume in different files, if you like to do so (e.g., work
60
- experiences could be in one file and talks in another). The YML files are
61
- merged before processing them.
62
- * the output filename is optional. If you do not specify one, the resume is
63
- generated to `resume-YYYY.MM.DD.format`, where `YYYY-MM-DD` is today's date
64
- and `format` is the chosen output format
65
-
66
- ## Checking validity
67
-
68
- Use the `check` command to verify whether your YAML file conforms with
69
- the intended syntax.
70
-
71
- ```ruby
72
- resme check resume.yaml
73
- ```
74
-
75
- ## Dates in the resume
76
-
77
- Enter dates in the resume in one of the following formats:
78
-
79
- * Any format accepted by Ruby for a full date (year, month, day)
80
- * YYYY-MM-DD
81
- * YYYY-MM
82
- * YYYY
83
-
84
- The third and the forth format allows you to enter "partial" dates
85
- (e.g., when the month or the day have been forgotten or are
86
- irrelevant).
87
-
88
- ## Creating your own templates
89
-
90
- The resumes are generated from the YML matter using ERB templates.
91
- The output formats should support different backends (OrgMode and
92
- Markdown easily allow for generation of PDFs, HTML, and ODT to mention
93
- a few).
94
-
95
- You can define your own templates if you wish to do so.
96
-
97
- All the data in the resume is made available in the `data` variable.
98
- Thus, for instance, the following code snippets generates a list of
99
- all the work experiences:
100
-
101
- <% data.work each do |exp| %>
102
- - <%= exp.who %>
103
- From: <%= exp.from %> till: <%= exp.till %>
104
- <% end %>
105
-
106
- To specify your own ERB template use the option `-t`. Thus, for instance:
107
-
108
- $ resme render -t template.md.erb [-o output_filename] file.yaml ...
109
-
110
- uses `template.md.erb` to generate the resume.
111
-
112
- Some functions can be used in the templates to better control the output.
113
-
114
- String manipulation functions:
115
-
116
- * `clean string` removes any space at the beginning of `string`
117
- * `reflow string, n` makes `string` into an array of strings of length
118
- lower or equal to `n` (useful if you are outputting a textual
119
- format, for instance.
120
-
121
- Dates manipulation functions:
122
-
123
- * `period` generates a string recapping a period. The function
124
- abstracts different syntax you can use for entries (i.e., `date` or
125
- `from` and `till`) and different values for the entries (e.g., a
126
- missing value for `till`)
127
- * `year string`, `month string`, `day string` return, respectively the
128
- year, month and day from strings in the format `YYYY-MM-DD`s
129
- * `has_month input` returns true if `input` has a month, that is, it is
130
- a date or it is in the form `YYYY-MM`
131
- * `has_day input` returns true if `input` has a day, that is, it is
132
- a date or it is in the form `YYYY-MM-DD`
133
-
134
- You can find the templates in `lib/resme/templates`. These might be
135
- good starting points if you want to develop your own.
136
-
137
- ## Contributing your templates
138
-
139
- If you develop an output template and want to make it available,
140
- please let me know, so that I can include it in future releases of
141
- this gem.
142
-
143
- ## Development
144
-
145
- After checking out the repo, run `bin/setup` to install
146
- dependencies. You can also run `bin/console` for an interactive prompt
147
- that will allow you to experiment.
148
-
149
- To install this gem onto your local machine, run `bundle exec rake
150
- install`. To release a new version, update the version number in
151
- `version.rb`, and then run `bundle exec rake release`, which will
152
- create a git tag for the version, push git commits and tags, and push
153
- the `.gem` file to [rubygems.org](https://rubygems.org).
154
-
155
- ## Contributing
156
-
157
- Bug reports and pull requests are welcome on GitHub at
158
- https://github.com/avillafiorita/resme.
159
-
160
- ## License
161
-
162
- The gem is available as open source under the terms of
163
- the [MIT License](http://opensource.org/licenses/MIT).
164
-
165
- ## Roadmap
166
-
167
- In `doc/todo.org` ... guess what is my preferred editor!
168
-
169
- ## Bugs
170
-
171
- There are still slight differences in the syntax of entries and in the
172
- way in which the information is formatted in various output formats.
173
- For instance, gender and birthdate are used in the Europass format,
174
- but not in the Markdown format. This is in part due to the different
175
- standards and in part due to personal preferences.
176
-
177
- **Entries are not sorted by date before outputting them. Make sure you
178
- put them in the order you want them to appear in your resume.**
179
-
180
- Unknown number of unknown bugs.
181
-
182
- ## Release History
183
-
184
- * **0.3** introduces output to org-mode, introduces references for the
185
- CV, improves output to JSON, adds a `check` command, removes useless
186
- blank lines in the output, supports `-%>` in the ERB templates,
187
- fixes various typos in the documentation, introduces various new
188
- formatting functions, to simplify template generation
189
- * **0.2** improves output of volunteering activities and other
190
- information in the Europass and **significantly improves error and
191
- warning reporting**
192
- * **0.1** is the first release
@@ -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
- &lt;ul&gt;
418
- <% data.interests.do |x| %>
419
- &lt;li&gt;<%= "#{x.name || ""}: #{x.level || ""}, #{x.summary || ""}; " %>&lt;/li&gt;
420
- <% end %>
421
- &lt;/ul&gt;
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
- &lt;ul&gt;
461
- <% data.projects.each do |x| %>
462
- &lt;/li&gt; <%= "#{x.name} (#{x.who}): #{x.role} (#{x.from}--#{x.till})" %> &lt;/li&gt;
463
- <% end %>
464
- &lt;/ul&gt;
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
- &lt;ul&gt;
476
- <% data.publications.each do |x| %>
477
- &lt;li&gt; <%= "#{x.title}, #{x.authors}, #{x.publisher}, #{x.date}" %> &lt;/li&gt;
478
- <% end %>
479
- &lt;/ul&gt;
480
- </Description>
481
- </Achievement>
482
- <% end %>
483
- </AchievementList>
484
- <Documentation>
485
- </Documentation>
486
- </LearnerInfo>
487
- <!--
488
- <AttachmentList>
489
- </AttachmentList>
490
- -->
491
- </SkillsPassport>