resumetools 0.2.7.0 → 0.2.7.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +3 -0
- data/Rakefile +0 -26
- data/lib/resumetools/grammars/resume.treetop +391 -389
- data/lib/resumetools/resume/json.rb +0 -2
- data/lib/resumetools/resume/pdf.rb +21 -43
- data/lib/resumetools/resume/plain_text.rb +1 -3
- data/lib/resumetools/resume/resume.rb +2 -1
- data/lib/resumetools/resume/text_reader.rb +1 -1
- data/lib/resumetools/version.rb +1 -7
- data/lib/resumetools.rb +16 -8
- data/lib/text/format.rb +1044 -0
- data/spec/grammar_spec.rb +2 -2
- data/tasks/gem.rake +43 -27
- metadata +110 -110
- data/tasks/package.rake +0 -9
@@ -1,389 +1,391 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
1
|
+
module ResumeTools
|
2
|
+
grammar ResumeGrammar
|
3
|
+
|
4
|
+
rule document
|
5
|
+
((contact_data / section / period / period_data / item / para / data) / LF)*
|
6
|
+
end
|
7
|
+
|
8
|
+
rule period_data
|
9
|
+
period_org / period_loc / period_dates / period_detail
|
10
|
+
end
|
11
|
+
|
12
|
+
rule period_org
|
13
|
+
period_detail_marker "O" whitespace content:text LF+ {
|
14
|
+
def data_type
|
15
|
+
:period_organization
|
16
|
+
end
|
17
|
+
|
18
|
+
def value
|
19
|
+
content.text_value.squeeze(" ").strip
|
20
|
+
end
|
21
|
+
|
22
|
+
def inspect
|
23
|
+
"Organization: " + value
|
24
|
+
end
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
rule period_loc
|
29
|
+
period_detail_marker "L" whitespace content:text LF+ {
|
30
|
+
def data_type
|
31
|
+
:period_location
|
32
|
+
end
|
33
|
+
|
34
|
+
def value
|
35
|
+
content.text_value.squeeze(" ").strip
|
36
|
+
end
|
37
|
+
|
38
|
+
def inspect
|
39
|
+
"Location: " + value
|
40
|
+
end
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
rule period_dates
|
45
|
+
period_detail_marker "D" whitespace content:text LF+ {
|
46
|
+
def data_type
|
47
|
+
:period_dates
|
48
|
+
end
|
49
|
+
|
50
|
+
def value
|
51
|
+
content.text_value.squeeze(" ").strip
|
52
|
+
end
|
53
|
+
|
54
|
+
def inspect
|
55
|
+
"Dates: " + value
|
56
|
+
end
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
rule contact_data
|
61
|
+
contact_name / contact_telephone / contact_email / contact_address /
|
62
|
+
contact_url / contact_detail
|
63
|
+
end
|
64
|
+
|
65
|
+
rule contact_url
|
66
|
+
contact_marker "U" whitespace content:text LF+ {
|
67
|
+
def data_type
|
68
|
+
:contact_url
|
69
|
+
end
|
70
|
+
|
71
|
+
def value
|
72
|
+
content.text_value.squeeze(" ").strip
|
73
|
+
end
|
74
|
+
|
75
|
+
def inspect
|
76
|
+
"Contact URL: " + value
|
77
|
+
end
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
rule contact_address
|
82
|
+
contact_marker "A" whitespace content:text LF+ {
|
83
|
+
def data_type
|
84
|
+
:contact_address
|
85
|
+
end
|
86
|
+
|
87
|
+
def value
|
88
|
+
content.text_value.squeeze(" ").strip
|
89
|
+
end
|
90
|
+
|
91
|
+
def inspect
|
92
|
+
"Contact address: " + value
|
93
|
+
end
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
rule contact_telephone
|
98
|
+
contact_marker "T" whitespace content:text LF+ {
|
99
|
+
def data_type
|
100
|
+
:contact_telephone
|
101
|
+
end
|
102
|
+
|
103
|
+
def value
|
104
|
+
content.text_value.squeeze(" ").strip
|
105
|
+
end
|
106
|
+
|
107
|
+
def inspect
|
108
|
+
"Contact telephone: " + value
|
109
|
+
end
|
110
|
+
}
|
111
|
+
end
|
112
|
+
|
113
|
+
rule contact_email
|
114
|
+
contact_marker "E" whitespace content:text LF+ {
|
115
|
+
def data_type
|
116
|
+
:contact_email
|
117
|
+
end
|
118
|
+
|
119
|
+
def value
|
120
|
+
content.text_value.squeeze(" ").strip
|
121
|
+
end
|
122
|
+
|
123
|
+
def inspect
|
124
|
+
"Contact e-mail: " + value
|
125
|
+
end
|
126
|
+
}
|
127
|
+
end
|
128
|
+
|
129
|
+
rule contact_telephone
|
130
|
+
contact_marker "T" whitespace content:text LF+ {
|
131
|
+
def data_type
|
132
|
+
:contact_telephone
|
133
|
+
end
|
134
|
+
|
135
|
+
def value
|
136
|
+
content.text_value.squeeze(" ").strip
|
137
|
+
end
|
138
|
+
|
139
|
+
def inspect
|
140
|
+
"Contact telephone: " + value
|
141
|
+
end
|
142
|
+
}
|
143
|
+
end
|
144
|
+
|
145
|
+
rule contact_name
|
146
|
+
contact_marker "N" whitespace content:text LF+ {
|
147
|
+
def data_type
|
148
|
+
:contact_name
|
149
|
+
end
|
150
|
+
|
151
|
+
def value
|
152
|
+
content.text_value.squeeze(" ").strip
|
153
|
+
end
|
154
|
+
|
155
|
+
def inspect
|
156
|
+
"Contact name: " + value
|
157
|
+
end
|
158
|
+
}
|
159
|
+
end
|
160
|
+
|
161
|
+
rule item
|
162
|
+
item_marker whitespace content:(item_data+) {
|
163
|
+
def data_type
|
164
|
+
:item
|
165
|
+
end
|
166
|
+
|
167
|
+
def value
|
168
|
+
content.text_value.gsub("\n", ' ').gsub("\t", ' ').squeeze(" ").strip
|
169
|
+
end
|
170
|
+
|
171
|
+
def inspect
|
172
|
+
"Item: " + value[0..100]
|
173
|
+
end
|
174
|
+
}
|
175
|
+
end
|
176
|
+
|
177
|
+
rule item_data
|
178
|
+
continuation content:text LF+ {
|
179
|
+
def inspect
|
180
|
+
content.text_value
|
181
|
+
end
|
182
|
+
}
|
183
|
+
end
|
184
|
+
|
185
|
+
rule continuation
|
186
|
+
[^-=>#+\n]
|
187
|
+
end
|
188
|
+
|
189
|
+
rule period_detail
|
190
|
+
period_detail_marker whitespace content:text LF+ {
|
191
|
+
def data_type
|
192
|
+
:period_detail
|
193
|
+
end
|
194
|
+
|
195
|
+
def value
|
196
|
+
content.text_value.squeeze(" ").strip
|
197
|
+
end
|
198
|
+
|
199
|
+
def inspect
|
200
|
+
"Detail: " + value
|
201
|
+
end
|
202
|
+
}
|
203
|
+
end
|
204
|
+
|
205
|
+
rule period
|
206
|
+
period_marker whitespace content:text LF {
|
207
|
+
def data_type
|
208
|
+
:period
|
209
|
+
end
|
210
|
+
|
211
|
+
def value
|
212
|
+
content.text_value.squeeze(" ").strip
|
213
|
+
end
|
214
|
+
|
215
|
+
def inspect
|
216
|
+
"Period: " + value
|
217
|
+
end
|
218
|
+
}
|
219
|
+
end
|
220
|
+
|
221
|
+
rule para
|
222
|
+
para_marker LF
|
223
|
+
content:(!("---") text LF)*
|
224
|
+
para_marker LF+ {
|
225
|
+
def data_type
|
226
|
+
:paragraph
|
227
|
+
end
|
228
|
+
|
229
|
+
def value
|
230
|
+
content.text_value.gsub(/\n/, ' ').squeeze(" ").strip
|
231
|
+
end
|
232
|
+
|
233
|
+
def inspect
|
234
|
+
"Paragraph: " + value[0..100]
|
235
|
+
end
|
236
|
+
}
|
237
|
+
end
|
238
|
+
|
239
|
+
rule section
|
240
|
+
section_marker whitespace content:text LF+ {
|
241
|
+
def data_type
|
242
|
+
:section
|
243
|
+
end
|
244
|
+
|
245
|
+
def value
|
246
|
+
content.text_value.squeeze(" ").strip
|
247
|
+
end
|
248
|
+
|
249
|
+
def inspect
|
250
|
+
"Section: " + elements[2].text_value
|
251
|
+
end
|
252
|
+
}
|
253
|
+
end
|
254
|
+
|
255
|
+
rule contact_detail
|
256
|
+
contact_marker whitespace content:text LF {
|
257
|
+
def data_type
|
258
|
+
:contact_detail
|
259
|
+
end
|
260
|
+
def value
|
261
|
+
content.text_value.squeeze(" ").strip
|
262
|
+
end
|
263
|
+
|
264
|
+
def inspect
|
265
|
+
"Contact detail: " + value
|
266
|
+
end
|
267
|
+
}
|
268
|
+
end
|
269
|
+
|
270
|
+
rule data
|
271
|
+
content:(text) LF {
|
272
|
+
def data_type
|
273
|
+
:untyped
|
274
|
+
end
|
275
|
+
|
276
|
+
def value
|
277
|
+
content.text_value
|
278
|
+
end
|
279
|
+
|
280
|
+
def inspect
|
281
|
+
"Data: \"" + value[0..100] + "\""
|
282
|
+
end
|
283
|
+
}
|
284
|
+
end
|
285
|
+
|
286
|
+
rule text
|
287
|
+
([^\n])+ {
|
288
|
+
def value
|
289
|
+
text_value
|
290
|
+
end
|
291
|
+
|
292
|
+
def inspect
|
293
|
+
"Line: " + value
|
294
|
+
end
|
295
|
+
}
|
296
|
+
end
|
297
|
+
|
298
|
+
rule LF
|
299
|
+
[\n] {
|
300
|
+
def data_type
|
301
|
+
nil
|
302
|
+
end
|
303
|
+
|
304
|
+
def value
|
305
|
+
""
|
306
|
+
end
|
307
|
+
|
308
|
+
def inspect
|
309
|
+
value
|
310
|
+
end
|
311
|
+
}
|
312
|
+
end
|
313
|
+
|
314
|
+
rule whitespace
|
315
|
+
[\t ]
|
316
|
+
end
|
317
|
+
|
318
|
+
rule contact_marker
|
319
|
+
"#" {
|
320
|
+
def value
|
321
|
+
nil
|
322
|
+
end
|
323
|
+
|
324
|
+
def inspect
|
325
|
+
"#"
|
326
|
+
end
|
327
|
+
}
|
328
|
+
end
|
329
|
+
|
330
|
+
rule item_marker
|
331
|
+
"-" {
|
332
|
+
def value
|
333
|
+
nil
|
334
|
+
end
|
335
|
+
|
336
|
+
def inspect
|
337
|
+
"-"
|
338
|
+
end
|
339
|
+
}
|
340
|
+
end
|
341
|
+
|
342
|
+
rule section_marker
|
343
|
+
"=" {
|
344
|
+
def value
|
345
|
+
nil
|
346
|
+
end
|
347
|
+
|
348
|
+
def inspect
|
349
|
+
"="
|
350
|
+
end
|
351
|
+
}
|
352
|
+
end
|
353
|
+
|
354
|
+
rule period_marker
|
355
|
+
"+" {
|
356
|
+
def value
|
357
|
+
nil
|
358
|
+
end
|
359
|
+
|
360
|
+
def inspect
|
361
|
+
"+"
|
362
|
+
end
|
363
|
+
}
|
364
|
+
end
|
365
|
+
|
366
|
+
rule period_detail_marker
|
367
|
+
">" {
|
368
|
+
def value
|
369
|
+
nil
|
370
|
+
end
|
371
|
+
|
372
|
+
def inspect
|
373
|
+
">"
|
374
|
+
end
|
375
|
+
}
|
376
|
+
end
|
377
|
+
|
378
|
+
rule para_marker
|
379
|
+
"---" {
|
380
|
+
def value
|
381
|
+
nil
|
382
|
+
end
|
383
|
+
|
384
|
+
def inspect
|
385
|
+
"---"
|
386
|
+
end
|
387
|
+
}
|
388
|
+
end
|
389
|
+
|
390
|
+
end # grammar ResumeGrammar
|
391
|
+
end # module ResumeTools
|