resume_exporter 0.0.1 → 1.0.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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/bin/resume_exporter +4 -2
  3. data/lib/exporters/html.rb +33 -0
  4. data/lib/exporters/pdf.rb +13 -0
  5. data/lib/extractors/html/linkedin.rb +145 -169
  6. data/lib/extractors/html/stackoverflow.rb +60 -72
  7. data/lib/extractors/html/xing.rb +46 -60
  8. data/lib/extractors/html.rb +1 -1
  9. data/lib/extractors/json/fresh.rb +196 -233
  10. data/lib/extractors/json/json_resume.rb +107 -127
  11. data/lib/extractors/json/prtflio.rb +20 -24
  12. data/lib/extractors/json.rb +7 -6
  13. data/lib/resume_exporter.rb +6 -0
  14. data/lib/templates/default.json.jbuilder +162 -229
  15. data/lib/templates/default.md.erb +99 -244
  16. data/lib/templates/default.txt.erb +99 -224
  17. data/lib/templates/default.xml.builder +162 -227
  18. data/lib/templates/fresh.json.jbuilder +149 -155
  19. data/lib/templates/html/_affiliation.liquid +53 -0
  20. data/lib/templates/html/_basics.liquid +19 -0
  21. data/lib/templates/html/_contact.liquid +27 -0
  22. data/lib/templates/html/_css.liquid +324 -0
  23. data/lib/templates/html/_disposition.liquid +13 -0
  24. data/lib/templates/html/_education.liquid +56 -0
  25. data/lib/templates/html/_employment.liquid +67 -0
  26. data/lib/templates/html/_extracurricular.liquid +53 -0
  27. data/lib/templates/html/_footer.liquid +1 -0
  28. data/lib/templates/html/_governance.liquid +52 -0
  29. data/lib/templates/html/_image.liquid +7 -0
  30. data/lib/templates/html/_interests.liquid +23 -0
  31. data/lib/templates/html/_languages.liquid +22 -0
  32. data/lib/templates/html/_open_source.liquid +53 -0
  33. data/lib/templates/html/_patents.liquid +50 -0
  34. data/lib/templates/html/_projects.liquid +53 -0
  35. data/lib/templates/html/_qualifications.liquid +53 -0
  36. data/lib/templates/html/_reading.liquid +52 -0
  37. data/lib/templates/html/_recognition.liquid +54 -0
  38. data/lib/templates/html/_references.liquid +28 -0
  39. data/lib/templates/html/_resume.liquid +49 -0
  40. data/lib/templates/html/_service.liquid +53 -0
  41. data/lib/templates/html/_skills.liquid +35 -0
  42. data/lib/templates/html/_social.liquid +25 -0
  43. data/lib/templates/html/_speaking.liquid +53 -0
  44. data/lib/templates/html/_writing.liquid +52 -0
  45. data/lib/templates/html/default.liquid +1 -0
  46. data/lib/templates/json_resume.json.jbuilder +72 -72
  47. metadata +119 -20
@@ -6,31 +6,31 @@ module Extractor
6
6
 
7
7
  def meta
8
8
  {
9
- format: @doc.dig(:meta, :format),
10
- version: @doc.dig(:meta, :version)
9
+ "format" => @doc.dig("meta", "format"),
10
+ "version" => @doc.dig("meta", "version")
11
11
  }
12
12
  end
13
13
 
14
14
  def basics
15
15
  {
16
- name: @doc.dig(:name),
17
- label: @doc.dig(:info, :label),
18
- image: @doc.dig(:info, :image),
19
- summary: @doc.dig(:info, :brief),
20
- characterClass: @doc.dig(:info, :characterClass),
21
- quote: @doc.dig(:info, :quote),
22
- contact: {
23
- email: @doc.dig(:contact, :email),
24
- phone: @doc.dig(:contact, :phone),
25
- website: @doc.dig(:contact, :website),
26
- location: @doc.dig(:location, :address),
27
- other: @doc.dig(:contact, :other),
28
- social: @doc.dig(:social).map do |social|
16
+ "name" => @doc.dig("name"),
17
+ "label" => @doc.dig("info", "label"),
18
+ "image" => @doc.dig("info", "image"),
19
+ "summary" => @doc.dig("info", "brief"),
20
+ "characterClass" => @doc.dig("info", "characterClass"),
21
+ "quote" => @doc.dig("info", "quote"),
22
+ "contact" => {
23
+ "email" => @doc.dig("contact", "email"),
24
+ "phone" => @doc.dig("contact", "phone"),
25
+ "website" => @doc.dig("contact", "website"),
26
+ "location" => @doc.dig("location", "address"),
27
+ "other" => @doc.dig("contact", "other"),
28
+ "social" => @doc.dig("social").map do |social|
29
29
  {
30
- network: social[:network],
31
- user: social[:user],
32
- label: social[:label],
33
- url: social[:url]
30
+ "network" => social["network"],
31
+ "user" => social["user"],
32
+ "label" => social["label"],
33
+ "url" => social["url"]
34
34
  }
35
35
  end
36
36
  }
@@ -38,277 +38,240 @@ module Extractor
38
38
  end
39
39
 
40
40
  def employment
41
- {
42
- summary: @doc.dig(:employment, :summary),
43
- history: @doc.dig(:employment, :history).map do |job|
44
- {
45
- employer: job[:employer],
46
- position: job[:position],
47
- url: job[:url],
48
- startDate: job[:start],
49
- endDate: job[:end],
50
- summary: job[:summary],
51
- location: job[:location],
52
- highlights: job[:highlights],
53
- keywords: job[:keywords]
54
- }
55
- end
56
- }
41
+ @doc.dig("employment", "history").map do |job|
42
+ {
43
+ "employer" => job["employer"],
44
+ "position" => job["position"],
45
+ "url" => job["url"],
46
+ "startDate" => job["start"],
47
+ "endDate" => job["end"],
48
+ "summary" => job["summary"],
49
+ "location" => job["location"],
50
+ "highlights" => job["highlights"],
51
+ "keywords" => job["keywords"]
52
+ }
53
+ end
57
54
  end
58
55
 
59
56
  def education
60
- {
61
- summary: @doc.dig(:education, :summary),
62
- level: @doc.dig(:education, :level),
63
- degree: @doc.dig(:education, :degree),
64
- history: @doc.dig(:education, :history).map do |education|
65
- {
66
- title: education[:title],
67
- institution: education[:institution],
68
- fieldOfStudy: education[:area],
69
- degree: education[:studyType],
70
- startDate: education[:start],
71
- endDate: education[:end],
72
- grade: education[:grade],
73
- url: education[:url],
74
- summary: education[:summary],
75
- location: education[:location],
76
- curriculum: education[:curriculum],
77
- highlights: education[:highlights],
78
- keywords: education[:keywords]
79
- }
80
- end
81
- }
57
+ @doc.dig("education", "history").map do |education|
58
+ {
59
+ "title" => education["title"],
60
+ "institution" => education["institution"],
61
+ "fieldOfStudy" => education["area"],
62
+ "degree" => education["studyType"],
63
+ "startDate" => education["start"],
64
+ "endDate" => education["end"],
65
+ "grade" => education["grade"],
66
+ "url" => education["url"],
67
+ "summary" => education["summary"],
68
+ "location" => education["location"],
69
+ "curriculum" => education["curriculum"],
70
+ "highlights" => education["highlights"],
71
+ "keywords" => education["keywords"]
72
+ }
73
+ end
82
74
  end
83
75
 
84
76
  def projects
85
- {
86
- history: @doc.dig(:projects).map do |project|
87
- {
88
- title: project[:title],
89
- description: project[:description],
90
- url: project[:url],
91
- repo: project[:repo],
92
- startDate: project[:start],
93
- endDate: project[:end],
94
- roles: [project[:role]],
95
- category: project[:category],
96
- summary: project[:summary],
97
- media: project[:media],
98
- highlights: project[:highlights],
99
- keywords: project[:keywords]
100
- }
101
- end
102
- }
77
+ @doc.dig("projects").map do |project|
78
+ {
79
+ "title" => project["title"],
80
+ "description" => project["description"],
81
+ "url" => project["url"],
82
+ "repo" => project["repo"],
83
+ "startDate" => project["start"],
84
+ "endDate" => project["end"],
85
+ "roles" => [project["role"]],
86
+ "category" => project["category"],
87
+ "summary" => project["summary"],
88
+ "media" => project["media"],
89
+ "highlights" => project["highlights"],
90
+ "keywords" => project["keywords"]
91
+ }
92
+ end
103
93
  end
104
94
 
105
95
  def skills
106
- {
107
- list: @doc.dig(:skills, :list),
108
- sets: @doc.dig(:skills, :sets).map do |skill|
109
- {
110
- name: skill[:name],
111
- level: skill[:level],
112
- keywords: skill[:skills]
113
- }
114
- end
115
- }
96
+ @doc.dig("skills", "sets").map do |skill|
97
+ {
98
+ "name" => skill["name"],
99
+ "level" => skill["level"],
100
+ "keywords" => skill["skills"]
101
+ }
102
+ end
116
103
  end
117
104
 
118
105
  def recognition
119
- {
120
- history: @doc.dig(:recognition).map do |recognition|
121
- {
122
- category: recognition[:category],
123
- title: recognition[:title],
124
- startDate: recognition[:date],
125
- from: recognition[:from],
126
- summary: recognition[:summary],
127
- url: recognition[:url]
128
- }
129
- end
130
- }
106
+ @doc.dig("recognition").map do |recognition|
107
+ {
108
+ "category" => recognition["category"],
109
+ "title" => recognition["title"],
110
+ "startDate" => recognition["date"],
111
+ "from" => recognition["from"],
112
+ "summary" => recognition["summary"],
113
+ "url" => recognition["url"]
114
+ }
115
+ end
131
116
  end
132
117
 
133
118
  def writing
134
- {
135
- history: @doc.dig(:writing).map do |writing|
136
- {
137
- title: writing[:title],
138
- category: writing[:category],
139
- publisher: ( writing[:publisher].is_a?(Hash) ? writing.dig(:publisher, :name) : writing[:publisher] ),
140
- date: writing[:date],
141
- url: writing[:url],
142
- summary: writing[:summary]
143
- }
144
- end
145
- }
119
+ @doc.dig("writing").map do |writing|
120
+ {
121
+ "title" => writing["title"],
122
+ "category" => writing["category"],
123
+ "publisher" => ( writing["publisher"].is_a?(Hash) ? writing.dig("publisher", "name") : writing["publisher"] ),
124
+ "date" => writing["date"],
125
+ "url" => writing["url"],
126
+ "summary" => writing["summary"]
127
+ }
128
+ end
146
129
  end
147
130
 
148
131
  def reading
149
- {
150
- history: @doc.dig(:reading).map do |reading|
151
- {
152
- title: reading[:title],
153
- category: reading[:category],
154
- url: reading[:url],
155
- author: ( reading[:author].is_a?(Array) ? reading[:author].join(", ") : reading[:author] ),
156
- date: reading[:date],
157
- summary: reading[:summary]
158
- }
159
- end
160
- }
132
+ @doc.dig("reading").map do |reading|
133
+ {
134
+ "title" => reading["title"],
135
+ "category" => reading["category"],
136
+ "url" => reading["url"],
137
+ "author" => ( reading["author"].is_a?(Array) ? reading["author"].join(", ") : reading["author"] ),
138
+ "date" => reading["date"],
139
+ "summary" => reading["summary"]
140
+ }
141
+ end
161
142
  end
162
143
 
163
144
  def speaking
164
- {
165
- history: @doc.dig(:speaking).map do |speaking|
166
- {
167
- title: speaking[:title],
168
- event: speaking[:event],
169
- location: speaking[:location],
170
- date: speaking[:date],
171
- summary: speaking[:summary],
172
- keywords: speaking[:keywords],
173
- highlights: speaking[:highlights]
174
- }
175
- end
176
- }
145
+ @doc.dig("speaking").map do |speaking|
146
+ {
147
+ "title" => speaking["title"],
148
+ "event" => speaking["event"],
149
+ "location" => speaking["location"],
150
+ "date" => speaking["date"],
151
+ "summary" => speaking["summary"],
152
+ "keywords" => speaking["keywords"],
153
+ "highlights" => speaking["highlights"]
154
+ }
155
+ end
177
156
  end
178
157
 
179
158
  def languages
180
- {
181
- list: @doc.dig(:languages).map do |language|
182
- {
183
- language: language[:language],
184
- level: language[:level],
185
- years: language[:years]
186
- }
187
- end
188
- }
159
+ @doc.dig("languages").map do |language|
160
+ {
161
+ "language" => language["language"],
162
+ "level" => language["level"],
163
+ "years" => language["years"]
164
+ }
165
+ end
189
166
  end
190
167
 
191
168
  def interests
192
- {
193
- list: @doc.dig(:interests).map do |interest|
194
- {
195
- name: interest[:name],
196
- keywords: interest[:keywords],
197
- description: interest[:summary]
198
- }
199
- end
200
- }
169
+ @doc.dig("interests").map do |interest|
170
+ {
171
+ "name" => interest["name"],
172
+ "keywords" => interest["keywords"],
173
+ "summary" => interest["summary"]
174
+ }
175
+ end
201
176
  end
202
177
 
203
178
  def extracurriculars
204
- {
205
- history: @doc.dig(:extracurricular).map do |extracurricular|
206
- {
207
- title: extracurricular[:title],
208
- summary: extracurricular[:activity],
209
- location: extracurricular[:location],
210
- startDate: extracurricular[:start],
211
- endDate: extracurricular[:end]
212
- }
213
- end
214
- }
179
+ @doc.dig("extracurricular").map do |extracurricular|
180
+ {
181
+ "title" => extracurricular["title"],
182
+ "summary" => extracurricular["activity"],
183
+ "location" => extracurricular["location"],
184
+ "startDate" => extracurricular["start"],
185
+ "endDate" => extracurricular["end"]
186
+ }
187
+ end
215
188
  end
216
189
 
217
190
  def affiliations
218
- {
219
- summary: @doc.dig(:affiliation, :summary),
220
- history: @doc.dig(:affiliation, :history).map do |affiliation|
221
- {
222
- category: affiliation[:category],
223
- organization: affiliation[:organization],
224
- roles: [affiliation[:role]],
225
- url: affiliation[:url],
226
- startDate: affiliation[:start],
227
- endDate: affiliation[:end],
228
- summary: affiliation[:summary],
229
- location: affiliation[:location],
230
- highlights: affiliation[:highlights],
231
- keywords: affiliation[:keywords]
232
- }
233
- end
234
- }
191
+ @doc.dig("affiliation", "history").map do |affiliation|
192
+ {
193
+ "category" => affiliation["category"],
194
+ "organization" => affiliation["organization"],
195
+ "roles" => [affiliation["role"]],
196
+ "url" => affiliation["url"],
197
+ "startDate" => affiliation["start"],
198
+ "endDate" => affiliation["end"],
199
+ "summary" => affiliation["summary"],
200
+ "location" => affiliation["location"],
201
+ "highlights" => affiliation["highlights"],
202
+ "keywords" => affiliation["keywords"]
203
+ }
204
+ end
235
205
  end
236
206
 
237
207
  def governance
238
- {
239
- history: @doc.dig(:governance).map do |governance|
240
- {
241
- summary: governance[:summary],
242
- category: governance[:category],
243
- roles: [governance[:role]],
244
- organization: governance[:organization],
245
- startDate: governance[:start],
246
- endDate: governance[:end],
247
- keywords: governance[:keywords],
248
- highlights: governance[:highlights]
249
- }
250
- end
251
- }
208
+ @doc.dig("governance").map do |governance|
209
+ {
210
+ "summary" => governance["summary"],
211
+ "category" => governance["category"],
212
+ "roles" => [governance["role"]],
213
+ "organization" => governance["organization"],
214
+ "startDate" => governance["start"],
215
+ "endDate" => governance["end"],
216
+ "keywords" => governance["keywords"],
217
+ "highlights" => governance["highlights"]
218
+ }
219
+ end
252
220
  end
253
221
 
254
222
  def service
255
- {
256
- summary: @doc.dig(:service, :summary),
257
- history: @doc.dig(:service, :history).map do |service|
258
- {
259
- category: service[:category],
260
- organization: service[:organization],
261
- roles: [service[:position]],
262
- url: service[:url],
263
- startDate: service[:start],
264
- endDate: service[:end],
265
- summary: service[:summary],
266
- location: service[:location],
267
- highlights: service[:highlights],
268
- keywords: service[:keywords]
269
- }
270
- end
271
- }
223
+ @doc.dig("service", "history").map do |service|
224
+ {
225
+ "category" => service["category"],
226
+ "organization" => service["organization"],
227
+ "roles" => [service["position"]],
228
+ "url" => service["url"],
229
+ "startDate" => service["start"],
230
+ "endDate" => service["end"],
231
+ "summary" => service["summary"],
232
+ "location" => service["location"],
233
+ "highlights" => service["highlights"],
234
+ "keywords" => service["keywords"]
235
+ }
236
+ end
272
237
  end
273
238
 
274
239
  def references
275
- {
276
- history: @doc.dig(:references).map do |reference|
277
- {
278
- name: reference[:name],
279
- role: reference[:role],
280
- category: reference[:category],
281
- private: reference[:private],
282
- contact: reference[:contact],
283
- summary: reference[:summary]
284
- }
285
- end
286
- }
240
+ @doc.dig("references").map do |reference|
241
+ {
242
+ "name" => reference["name"],
243
+ "role" => reference["role"],
244
+ "category" => reference["category"],
245
+ "private" => reference["private"],
246
+ "contact" => reference["contact"],
247
+ "summary" => reference["summary"]
248
+ }
249
+ end
287
250
  end
288
251
 
289
252
  def disposition
290
253
  {
291
- travel: @doc.dig(:disposition, :travel),
292
- authorization: @doc.dig(:disposition, :authorization),
293
- commitment: @doc.dig(:disposition, :commitment),
294
- remote: @doc.dig(:disposition, :remote),
295
- relocation: {
296
- willing: @doc.dig(:disposition, :relocation, :willing),
297
- destinations: @doc.dig(:disposition, :relocation, :destinations)
254
+ "travel" => @doc.dig("disposition", "travel"),
255
+ "authorization" => @doc.dig("disposition", "authorization"),
256
+ "commitment" => @doc.dig("disposition", "commitment"),
257
+ "remote" => @doc.dig("disposition", "remote"),
258
+ "relocation" => {
259
+ "willing" => @doc.dig("disposition", "relocation", "willing"),
260
+ "destinations" => @doc.dig("disposition", "relocation", "destinations")
298
261
  }
299
262
  }
300
263
  end
301
264
 
302
265
  def location
303
- @doc.dig(:location)
266
+ @doc.dig("location")
304
267
  end
305
268
 
306
269
  def samples
307
- @doc.dig(:samples)
270
+ @doc.dig("samples")
308
271
  end
309
272
 
310
273
  def testimonials
311
- @doc.dig(:testimonials)
274
+ @doc.dig("testimonials")
312
275
  end
313
276
  end
314
277
  end