xmlresume2x 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,4 +1,42 @@
1
1
  ------------------------------------------------------------------------
2
+ r28 | thomas | 2005-01-13 01:51:17 +0100 (Thu, 13 Jan 2005) | 5 lines
3
+ Changed paths:
4
+ M /trunk/Rakefile
5
+ M /trunk/TODO
6
+ M /trunk/data/xmlresume2x/format/xhtml.cfg
7
+ A /trunk/data/xmlresume2x/misc/css
8
+ A /trunk/data/xmlresume2x/misc/css/blue.css
9
+ M /trunk/doc/src/examples.fragment
10
+ M /trunk/lib/xmlresume2x/converter.rb
11
+ M /trunk/lib/xmlresume2x/processor.rb
12
+ M /trunk/testfiles/example2.xml
13
+
14
+ * added first version of blue.css
15
+ * added a TOC menu to the xhtml output
16
+ * normalized css class names, all have a x2x prefix now
17
+ * corrected bug in xhtml.cfg in which HTML tags were transformed into text
18
+ * added meta tag keywords to xhtml.cfg output
19
+ ------------------------------------------------------------------------
20
+ r27 | thomas | 2005-01-12 21:17:13 +0100 (Wed, 12 Jan 2005) | 4 lines
21
+ Changed paths:
22
+ M /trunk/Rakefile
23
+ M /trunk/TODO
24
+ M /trunk/lib/xmlresume2x/wrapper.rb
25
+ M /trunk/testfiles/example1.xml
26
+ M /trunk/testfiles/example2.xml
27
+
28
+ * corrected latex-europecv bug: name of phone type and phone number were on different lines in contacts
29
+ * add some TODOs
30
+ * changed DOCTYPE of testfiles
31
+ * changed Rakefile to copy resume.dtd and iso-lat1.ent to output doc dir, fixed error when running rake doc
32
+ ------------------------------------------------------------------------
33
+ r26 | thomas | 2005-01-12 15:21:41 +0100 (Wed, 12 Jan 2005) | 1 line
34
+ Changed paths:
35
+ M /trunk/TODO
36
+ M /trunk/data/xmlresume2x/lang/fr.cfg
37
+
38
+ * incorporated changes from Mathieu Chappuis into fr.cfg
39
+ ------------------------------------------------------------------------
2
40
  r24 | thomas | 2004-12-20 15:19:00 +0100 (Mon, 20 Dec 2004) | 2 lines
3
41
  Changed paths:
4
42
  M /trunk/Rakefile
data/Rakefile CHANGED
@@ -80,13 +80,22 @@ task :doc => [:rdoc, :gen_version] do
80
80
  chdir "doc" do
81
81
  sh "webgen -V 3"
82
82
  end
83
- ruby "-Ilib bin/xmlresume2x -d data/xmlresume2x -f xhtml -l en testfiles/example1.xml > doc/output/examples/example1.html"
84
- ruby "-Ilib bin/xmlresume2x -d data/xmlresume2x -f xhtml -l en testfiles/example2.xml > doc/output/examples/example2.html"
85
- ruby "-Ilib bin/xmlresume2x -d data/xmlresume2x -f latex-europecv -l en testfiles/example1.xml | latex"
83
+
84
+ ruby "-Ilib bin/xmlresume2x -d data/xmlresume2x -f xhtml -l en testfiles/example1.xml > doc/output/examples/example1styled.html"
85
+ sh "sed -e '7 d' doc/output/examples/example1styled.html > doc/output/examples/example1.html"
86
+ ruby "-Ilib bin/xmlresume2x -d data/xmlresume2x -f xhtml -l en testfiles/example2.xml > doc/output/examples/example2styled.html"
87
+ sh "sed -e '7 d' doc/output/examples/example2styled.html > doc/output/examples/example2.html"
88
+ cp "data/xmlresume2x/misc/css/blue.css", "doc/output/examples/cv.css"
89
+
90
+ ruby "-Ilib bin/xmlresume2x -d data/xmlresume2x -f latex-europecv -l en testfiles/example1.xml > texput.tex"
91
+ sh "latex texput.tex"
86
92
  sh "dvipdf texput.dvi doc/output/examples/example1.pdf"
87
- ruby "-Ilib bin/xmlresume2x -d data/xmlresume2x -f latex-europecv -l en testfiles/example2.xml | latex"
93
+ ruby "-Ilib bin/xmlresume2x -d data/xmlresume2x -f latex-europecv -l en testfiles/example2.xml > texput.tex"
94
+ sh "latex texput.tex"
88
95
  sh "dvipdf texput.dvi doc/output/examples/example2.pdf"
89
- sh "cp testfiles/example*.xml doc/output/examples"
96
+
97
+ cp FileList["testfiles/example*.xml"].to_a, "doc/output/examples"
98
+ cp ["misc/dtd/resume.dtd", "misc/dtd/iso-lat1.ent"].to_a, "doc/output/examples"
90
99
  end
91
100
 
92
101
  rd = Rake::RDocTask.new do |rdoc|
data/TODO CHANGED
@@ -1,10 +1,26 @@
1
+ ---- CURRENT ----
2
+
1
3
  * add some css files to distribution
2
- * add TOC-menu to xhtml format
3
- * generalize formating of publications, look at pub.xsl
4
- * add support for multiple pubs, memberships, ...???
4
+ * add objective section to output formats
5
5
  * most words in lang files should be lowercase, config files should capitalize words correctly
6
+ * add support for external OR internal stylesheet
7
+
8
+ ---- FUTURE ----
9
+
6
10
  * add Spanish and Esperanto language support
7
11
  * add output filter for text (use Text::Format)
12
+ * add other formats (ASCIIDoc, Docbook)
13
+ * generalize formating of publications, look at pub.xsl
14
+ * add support for multiple pubs, memberships, ...???
15
+ * add testsuite for lib/**
16
+ * add additional resume elements???
17
+ * respect order of elements??? (XSL files currently do this)
18
+ * build graphical UI for using xmlresume2x (selecting lang and format, ...)
19
+ * GUI for editing resume xml??? -> with realtime text preview via xmlresume2x
20
+ * direct PDF creation with RUBY-FPDF or other PDF tools???
21
+ * include support for target attribute
22
+ * add support HR-XML input files???
23
+ * add preliminary support for xmlresume 2.0
8
24
 
9
25
  ---- FINISHED ----
10
26
 
@@ -34,4 +50,9 @@
34
50
  * provide Array#separate_by( normal, last ) for use with major/minor list
35
51
  * provide sample output on homepage for test r�sum�s
36
52
  * BUG: iconv not available on windows -> use other tool (eventually #pack and #unpack)
37
- * add output filter for HTML
53
+ * add output filter for HTML
54
+ * correct latex-europecv BUG: References, phone numbers on new line (example2)
55
+ * xhtml class names should include a prefix (useful when incorporating into other page, eg. x2x)
56
+ * name style class names in css for xhtml format similar
57
+ * xhtml.cfg: degree title should get h2!!!
58
+ * add TOC-menu to xhtml format
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -12,37 +12,34 @@ def newline
12
12
  tag( 'br' )
13
13
  end
14
14
 
15
- SEPARATOR= ''
16
- GAP='5pt'
17
-
18
15
  #####################################################
19
16
  # Processors for simple elements
20
17
 
21
18
  add_processor 'SubParaProcessor' do |element|
22
- element.para.collect {|p| tag( 'p' ).add( p.process! )}
19
+ element.para.collect {|p| tag( 'p', 'class'=>'x2x-para' ).add( p.process! )}
23
20
  end
24
21
 
25
22
  #####################################################
26
23
  # Inline elements
27
24
 
28
25
  processor 'link' => 'LinkProcessor' do |link|
29
- tag( 'a', 'href' => link._href ).add( link.process_children! )
26
+ tag( 'a', 'class'=>'x2x-link', 'href' => link._href ).add( link.process_children! )
30
27
  end
31
28
 
32
29
  processor 'emphasis' => 'EmphasisProcessor' do |em|
33
- tag( 'em' ).add( em.process_children! )
30
+ tag( 'em', 'class'=>'x2x-emphasis' ).add( em.process_children! )
34
31
  end
35
32
 
36
33
  processor 'citation' => 'CitationProcessor' do |citation|
37
- tag( 'cite' ).add( citation.process_children! )
34
+ tag( 'cite', 'class'=>'x2x-citation' ).add( citation.process_children! )
38
35
  end
39
36
 
40
37
  processor 'url' => 'UrlProcessor' do |url|
41
- tag( 'a', 'href' => url.text! ).add( url.process_children! )
38
+ tag( 'a', 'class'=>'x2x-url', 'href' => url.text! ).add( url.process_children! )
42
39
  end
43
40
 
44
41
  processor 'email' => 'EmailProcessor' do |email|
45
- tag( 'a', 'href' => "mailto:#{email.text!}" ).add( email.process_children! )
42
+ tag( 'a', 'class'=>'x2x-email', 'href' => "mailto:#{email.text!}" ).add( email.process_children! )
46
43
  end
47
44
 
48
45
  processor 'period' => 'PeriodProcessor' do |period|
@@ -68,12 +65,12 @@ end
68
65
  # General elements
69
66
 
70
67
  processor 'projects' => 'ProjectsProcessor' do |projects|
71
- tag( 'ul' ).add( projects.project.process_all! )
68
+ tag( 'ul', 'class'=>'x2x-projects' ).add( projects.project.process_all! )
72
69
  end
73
70
 
74
71
  processor 'project' => 'ProjectProcessor' do |project|
75
- t = tag( 'li' )
76
- t.add( tag( 'span', 'class' => 'projectTitle' ).add( project._title ) ).add(': ') unless project._title.nil?
72
+ t = tag( 'li', 'class'=>'x2x-project' )
73
+ t.add( tag( 'span', 'class' => 'x2x-project-title' ).add( project._title ) ).add(': ') unless project._title.nil?
77
74
  t.add( project.process_children! )
78
75
  end
79
76
 
@@ -81,6 +78,30 @@ end
81
78
  #####################################################
82
79
  # Resume elements
83
80
 
81
+ def generate_toc_headings( elements, id, level )
82
+ ul = tag( 'ul' ).builder
83
+ elements.each do |e|
84
+ ul.li do |li|
85
+ li.a( e.text, 'href'=>"##{id}" )
86
+ e.add_attribute( 'id', id.dup )
87
+ id.succ!
88
+ headers = e.elements.to_a( "..//#{level}" )
89
+ li.add!( generate_toc_headings( headers, id, level.succ ) ) if headers.length > 0
90
+ end
91
+ end
92
+ ul
93
+ end
94
+
95
+ def generate_toc( html )
96
+ t = tag( 'div', 'class'=>'x2x-toc-menu' ).builder
97
+ t.ul do |ul|
98
+ ul.li( keyword(:Resume), ' >>' ) do |li|
99
+ li.add!( generate_toc_headings( html.elements.to_a( '//h1' ), "heading001", 'h2' ) )
100
+ end
101
+ end
102
+ t
103
+ end
104
+
84
105
  processor 'resume' => 'ResumeProcessor' do |resume|
85
106
  language = case self.lang
86
107
  when 'de' then 'german'
@@ -102,40 +123,41 @@ processor 'resume' => 'ResumeProcessor' do |resume|
102
123
  b = html.builder
103
124
  b.head do |h|
104
125
  h.meta( 'http-equiv'=>'Content-Type', 'content'=>'text/html; charset=utf-8' )
126
+ h.meta( 'name'=>'keywords', 'content'=>resume.keywords ) if resume.keywords
105
127
  h.title( "#{keyword(:Resume)} #{keyword(:Of)} #{resume.header.name}" )
106
128
  h.link( 'href'=>'cv.css', 'rel'=>'stylesheet' )
107
129
  end
108
- b.body do |b|
109
- b.div( 'class'=>'resume' ) do |d|
110
- d.div( 'class'=>'nameSection' ) do |e|
111
- e.h1( resume.header.name, 'class'=>'nameHeading' )
112
- e.p( resume.header.address, 'class'=>'address' )
113
- e.p( resume.header.contact, 'class'=>'contact' )
130
+ b.body do |body|
131
+ body.div( 'class'=>'x2x-resume' ) do |d|
132
+ d.div( 'class'=>'x2x-nameSection' ) do |e|
133
+ e.h1( resume.header.name, 'class'=>'x2x-sectionHeading' )
134
+ e.p( resume.header.address, 'class'=>'x2x-address' )
135
+ e.p( resume.header.contact, 'class'=>'x2x-contact' )
114
136
  end
115
137
 
116
- d.div( 'class'=>'historySection' ) do |e|
117
- e.h1( keyword(:History_Title ), 'class'=>'sectionHeading' )
138
+ d.div( 'class'=>'x2x-historySection' ) do |e|
139
+ e.h1( keyword(:History_Title ), 'class'=>'x2x-sectionHeading' )
118
140
  e.add!( resume.history.process_all! )
119
141
  end if resume.history
120
142
 
121
- d.div( 'class'=>'academicsSection' ) do |e|
122
- e.h1( keyword(:Education_Title ), 'class'=>'sectionHeading' )
143
+ d.div( 'class'=>'x2x-academicsSection' ) do |e|
144
+ e.h1( keyword(:Education_Title ), 'class'=>'x2x-sectionHeading' )
123
145
  e.add!( resume.academics.process_all! )
124
146
  end if resume.academics
125
147
 
126
- d.div( 'class'=>'skillsSection' ) do |e|
127
- e.h1( keyword(:Skills_Title ), 'class'=>'sectionHeading' )
148
+ d.div( 'class'=>'x2x-skillsSection' ) do |e|
149
+ e.h1( keyword(:Skills_Title ), 'class'=>'x2x-sectionHeading' )
128
150
  e.add!( resume.skillarea.process_all! )
129
151
  end if resume.skillarea
130
152
 
131
- d.div( 'class'=>'interestsSection' ) do |e|
132
- e.h1( keyword(:Interests_Title ), 'class'=>'sectionHeading' )
153
+ d.div( 'class'=>'x2x-interestsSection' ) do |e|
154
+ e.h1( keyword(:Interests_Title ), 'class'=>'x2x-sectionHeading' )
133
155
  e.add!( resume.interests.process_all! )
134
156
  end if resume.interests
135
157
 
136
158
  if resume.pubs || resume.memberships || resume.awards || resume.clearances || resume.referees
137
- d.div( 'class'=>'addInfoSection' ) do |e|
138
- e.h1( keyword(:AdditionalInformation ), 'class'=>'sectionHeading' )
159
+ d.div( 'class'=>'x2x-addInfoSection' ) do |e|
160
+ e.h1( keyword(:AdditionalInformation ), 'class'=>'x2x-sectionHeading' )
139
161
  e.add!( resume.memberships.process_all! ) if resume.memberships
140
162
  e.add!( resume.awards.process_all! ) if resume.awards
141
163
  e.add!( resume.clearances.process_all! ) if resume.clearances
@@ -144,9 +166,11 @@ processor 'resume' => 'ResumeProcessor' do |resume|
144
166
  end
145
167
  end
146
168
 
147
- d.p( resume.lastModified, 'class'=>'lastModified' ) if resume.lastModified
148
- d.div( resume.copyright, 'class'=>'copyright' ) if resume.copyright
169
+ d.p( resume.lastModified, 'class'=>'x2x-lastModified' ) if resume.lastModified
170
+ d.div( resume.copyright, 'class'=>'x2x-copyright' ) if resume.copyright
149
171
  end
172
+
173
+ body.add!( generate_toc( html ) ) unless keyword( :xhtml_no_toc )
150
174
  end
151
175
 
152
176
  output = ''
@@ -162,18 +186,18 @@ processor 'history' => 'HistoryProcessor' do |history|
162
186
  end
163
187
 
164
188
  processor 'job' => 'JobProcessor' do |job|
165
- b = tag( 'div', 'class'=>'job' ).builder
166
- b.h2( job.jobtitle, 'class'=>'jobTitle' )
167
- b.span( job.employer, 'class'=>'employer' )
168
- b.span( ' (', job.location, ')', 'class'=>'location' ) if job.location
189
+ b = tag( 'div', 'class'=>'x2x-job' ).builder
190
+ b.h2( job.jobtitle, 'class'=>'x2x-jobtitle' )
191
+ b.span( job.employer, 'class'=>'x2x-employer' )
192
+ b.span( ' (', job.location, ')', 'class'=>'x2x-location' ) if job.location
169
193
  b.br
170
- b.span( job.period || job.date, 'class'=>'date' ).br
171
- b.div( job.description, 'class'=>'jobDescription' ) if job.description
172
- b.div( 'class'=>'projects' ) do |div|
194
+ b.span( job.period || job.date, 'class'=>'x2x-date' ).br
195
+ b.div( job.description, 'class'=>'x2x-description' ) if job.description
196
+ b.div( 'class'=>'x2x-projects-div' ) do |div|
173
197
  div.p( keyword(:Projects), ':' )
174
198
  div.add!( job.projects )
175
199
  end if job.projects
176
- b.div( 'class'=>'achievements') do |div|
200
+ b.div( 'class'=>'x2x-achievements-div') do |div|
177
201
  div.p( keyword(:History_Achievements), ':' )
178
202
  div.add!( job.achievements )
179
203
  end if job.achievements
@@ -181,11 +205,11 @@ processor 'job' => 'JobProcessor' do |job|
181
205
  end
182
206
 
183
207
  processor 'achievements' => 'AchievementsProcessor' do |achievements|
184
- tag( 'ul' ).add( achievements.achievement.process_all! )
208
+ tag( 'ul', 'class'=>'x2x-achievements' ).add( achievements.achievement.process_all! )
185
209
  end
186
210
 
187
211
  processor 'achievement' => 'AchievementProcessor' do |achievement|
188
- tag( 'li' ).add( achievement.process_children! )
212
+ tag( 'li', 'class'=>'x2x-achievement' ).add( achievement.process_children! )
189
213
  end
190
214
 
191
215
 
@@ -205,27 +229,29 @@ def gpa_type( type )
205
229
  end
206
230
 
207
231
  processor 'degree' => 'DegreeProcessor' do |degree|
208
- b = tag( 'div', 'class'=>'degree' ).builder
209
-
210
- b.span( 'class'=>'degreeTitle' ) do |s|
211
- s.add!( degree.level )
212
- s.add!( ' ', keyword( :In ), ' ', degree.major.separate_by( ', ', " #{keyword(:And)} " ) ) if degree.major
232
+ b = tag( 'div', 'class'=>'x2x-degree' ).builder
233
+
234
+ b.h2( 'class'=>'x2x-degree-title' ) do |s|
235
+ text = degree.level.to_s
236
+ text << " #{keyword( :In )} #{degree.major.separate_by( ', ', " #{keyword(:And)} " )}" if degree.major
237
+ s.add!( text )
238
+ s.span( 'class'=>'x2x-degree-title-other' ) do |other|
239
+ other.add!( ' (', (degree.minor.length > 1 ? keyword(:Education_Minors) : keyword(:Education_Minor) ), ': ',
240
+ degree.minor.separate_by( ', ', " #{keyword(:And)} " ), ')' ) if degree.minor
241
+ other.add!( ", ").span( degree.period || degree.date, 'class'=>'x2x-date' ) if degree.period || degree.date
242
+ other.add!( '. ', degree.annotation ) if degree.annotation
243
+ end
213
244
  end
214
- b.add!( ' (', (degree.minor.length > 1 ? keyword(:Education_Minors) : keyword(:Education_Minor) ), ': ',
215
- degree.minor.separate_by( ', ', " #{keyword(:And)} " ), ')' ) if degree.minor
216
- b.add!( ", ").span( degree.period || degree.date, 'class'=>'date' ) if degree.period || degree.date
217
- b.add!( '. ', degree.annotation ) if degree.annotation
218
245
 
219
246
  if degree.institution
220
- b.br
221
- b.span( degree.institution, 'class'=>'institution' )
222
- b.span( ' (', degree.location, ')', 'class'=>'location' ) if degree.location
247
+ b.span( degree.institution, 'class'=>'x2x-institution' )
248
+ b.span( ' (', degree.location, ')', 'class'=>'x2x-location' ) if degree.location
223
249
  end
224
250
 
225
251
  b.add!( degree.gpa ) if degree.gpa
226
252
  b.p( keyword(:Education_Subjects), ': ', degree.subjects ) if degree.subjects
227
253
 
228
- b.div( 'class'=>'projects' ) do |div|
254
+ b.div( 'class'=>'x2x-projects-div' ) do |div|
229
255
  div.p( keyword(:Projects), ':' )
230
256
  div.add!( degree.projects )
231
257
  end if degree.projects
@@ -242,9 +268,9 @@ processor 'subject' => 'SubjectProcessor' do |subject|
242
268
  end
243
269
 
244
270
  processor 'gpa' => 'GpaProcessor' do |gpa|
245
- b = tag( 'div' ).builder
271
+ b = tag( 'div', 'class'=>'x2x-gpa' ).builder
246
272
  b.p do |p|
247
- p.span( gpa_type( gpa._type ), 'class'=>'gpaPreamble' ).add!( ': ', gpa.score )
273
+ p.span( gpa_type( gpa._type ), 'class'=>'x2x-gpa-preamble' ).add!( ': ', gpa.score )
248
274
  p.add!( " #{keyword(:Education_Gpa_Outof)} #{gpa.possible}" ) if gpa.possible
249
275
  end
250
276
  b.add!( gpa.note ) if gpa.note
@@ -255,16 +281,16 @@ end
255
281
  # Skill specific elements
256
282
 
257
283
  processor 'skillarea' => 'SkillareaProcessor' do |skillarea|
258
- b = tag( 'div', 'class'=>'skillarea' ).builder
259
- b.h2( skillarea.title || keyword(:Skills_Title), 'class'=>'skillareaTitle' )
260
- b.ul {|ul| ul.add!( skillarea.skillset.process_all! )}
284
+ b = tag( 'div', 'class'=>'x2x-skillarea-div' ).builder
285
+ b.h2( skillarea.title || keyword(:Skills_Title), 'class'=>'x2x-title' )
286
+ b.ul( 'class'=>'x2x-skillarea' ) {|ul| ul.add!( skillarea.skillset.process_all! )}
261
287
  b
262
288
  end
263
289
 
264
290
  processor 'skillset' => 'SkillsetProcessor' do |skillset|
265
- b = tag( 'li' ).builder
266
- b.span( skillset.title, ': ', 'class'=>'skillsetTitle' ) if skillset.title
267
- b.add!( skillset.skill.collect {|skill| "#{skill}#{skill._level ? " (#{skill._level})" : "" }"}.join( ', ' ) )
291
+ b = tag( 'li', 'class'=>'x2x-skillset' ).builder
292
+ b.span( skillset.title, ': ', 'class'=>'x2x-title' ) if skillset.title
293
+ b.add!( skillset.skill.collect {|skill| [skill, skill._level ? " (#{skill._level})" : ""] }.join( REXML::Text.new( ', ' ) ) )
268
294
  b
269
295
  end
270
296
 
@@ -272,15 +298,15 @@ end
272
298
  # Interest specific elements
273
299
 
274
300
  processor 'interests' => 'InterestsProcessor' do |interests|
275
- b = tag( 'div', 'class'=>'interests' ).builder
276
- b.h2( interests.title || keyword(:Interests_Title), 'class'=>'interestsTitle' )
277
- b.ul {|ul| ul.add!( interests.interest.process_all! )}
301
+ b = tag( 'div', 'class'=>'x2x-interests-div' ).builder
302
+ b.h2( interests.title || keyword(:Interests_Title), 'class'=>'x2x-title' )
303
+ b.ul( 'class'=>'x2x-interests' ) {|ul| ul.add!( interests.interest.process_all! )}
278
304
  b
279
305
  end
280
306
 
281
307
  processor 'interest' => 'InterestProcessor' do |interest|
282
- b = tag( 'li' ).builder
283
- b.span( interest.title, 'class'=>'interestTitle' )
308
+ b = tag( 'li', 'class'=>'x2x-interest' ).builder
309
+ b.span( interest.title, 'class'=>'x2x-title' )
284
310
  b.add!( interest.description ) if interest.description
285
311
  b
286
312
  end
@@ -289,17 +315,17 @@ end
289
315
  # Publication specific elements
290
316
 
291
317
  processor 'pubs' => 'PubsProcessor' do |pubs|
292
- b = tag( 'div', 'class'=>'pubs' ).builder
293
- b.h2( keyword(:Publications_Title), 'class'=>'publicationsTitle' )
294
- b.ul {|ul| ul.add!( pubs.pub.process_all! )}
318
+ b = tag( 'div', 'class'=>'x2x-pubs-div' ).builder
319
+ b.h2( keyword(:Publications_Title), 'class'=>'x2x-pubs-title' )
320
+ b.ul( 'class'=>'x2x-pubs' ) {|ul| ul.add!( pubs.pub.process_all! )}
295
321
  b
296
322
  end
297
323
 
298
324
  processor 'pub' => 'PubProcessor' do |pub|
299
- t = tag( 'li' )
325
+ t = tag( 'li', 'class'=>'x2x-pub' )
300
326
 
301
- title = pub.artTitle ? [tag( 'span', 'class'=>'artTitle' ).add( pub.artTitle )] : []
302
- title << [ ". #{keyword(:Publications_In).capitalize} ", tag( 'span', 'class'=>'bookTitle' ).add( pub.bookTitle ) ] if pub.bookTitle
327
+ title = pub.artTitle ? [tag( 'span', 'class'=>'x2x-artTitle' ).add( pub.artTitle )] : []
328
+ title << [ ". #{keyword(:Publications_In).capitalize} ", tag( 'span', 'class'=>'x2x-bookTitle' ).add( pub.bookTitle ) ] if pub.bookTitle
303
329
 
304
330
  t.add( pub.author.join( ', ' ), ': ' ) if pub.author
305
331
  t.add( title ) if title
@@ -328,20 +354,20 @@ end
328
354
  # Membership specific elements
329
355
 
330
356
  processor 'memberships' => 'MembershipsProcessor' do |memberships|
331
- b = tag( 'div', 'class'=>'memberships' ).builder
332
- b.h2( memberships.title, 'class'=>'membershipsTitle' )
333
- b.ul {|ul| ul.add!( memberships.membership.process_all! )}
357
+ b = tag( 'div', 'class'=>'x2x-memberships-div' ).builder
358
+ b.h2( memberships.title, 'class'=>'x2x-title' )
359
+ b.ul( 'class'=>'x2x-memberships' ) {|ul| ul.add!( memberships.membership.process_all! )}
334
360
  b
335
361
  end
336
362
 
337
363
  processor 'membership' => 'MembershipProcessor' do |m|
338
364
  organization = if m.organization
339
365
  arr = [ m.organization ]
340
- arr << " (" << tag( 'span', 'class'=>'location' ).add( m.location ) << ")" if m.location
366
+ arr << " (" << tag( 'span', 'class'=>'x2x-location' ).add( m.location ) << ")" if m.location
341
367
  arr
342
368
  end
343
- t = tag( 'li' ).add( [m.title, organization ].compact.join( newline ) )
344
- t.add( tag( 'br' ), tag( 'span', 'class'=>'date' ).add( m.date || m.period ) ) if m.date || m.period
369
+ t = tag( 'li', 'class'=>'x2x-membership' ).add( [m.title, organization ].compact.join( newline ) )
370
+ t.add( newline, tag( 'span', 'class'=>'x2x-date' ).add( m.date || m.period ) ) if m.date || m.period
345
371
  t.add( m.description ) if m.description
346
372
  t
347
373
  end
@@ -350,16 +376,16 @@ end
350
376
  # Clearance specific elements
351
377
 
352
378
  processor 'clearances' => 'ClearancesProcessor' do |clearances|
353
- b = tag( 'div', 'class'=>'clearances' ).builder
354
- b.h2( clearances.title || keyword(:SecurityClearances_Title), 'class'=>'clearancesTitle' )
355
- b.ul {|ul| ul.add!( clearances.clearance.process_all! )}
379
+ b = tag( 'div', 'class'=>'x2x-clearances-div' ).builder
380
+ b.h2( clearances.title || keyword(:SecurityClearances_Title), 'class'=>'x2x-title' )
381
+ b.ul( 'class'=>'x2x-clearances' ) {|ul| ul.add!( clearances.clearance.process_all! )}
356
382
  b
357
383
  end
358
384
 
359
385
  processor 'clearance' => 'ClearanceProcessor' do |c|
360
- t = tag( 'li' )
386
+ t = tag( 'li', 'class'=>'x2x-clearance' )
361
387
  t.add( [c.level, c.organization].compact.join( ', ' ) )
362
- t.add( ", ", tag( 'span', 'class'=>'date' ).add( c.date || c.period ) ) if c.date || c.period
388
+ t.add( ", ", tag( 'span', 'class'=>'x2x-date' ).add( c.date || c.period ) ) if c.date || c.period
363
389
  t.add( c.note ) if c.note
364
390
  t
365
391
  end
@@ -368,16 +394,16 @@ end
368
394
  # Award specific elements
369
395
 
370
396
  processor 'awards' => 'AwardsProcessor' do |awards|
371
- b = tag( 'div', 'class'=>'awards' ).builder
372
- b.h2( awards.title || keyword(:Awards_Title), 'class'=>'awardsTitle' )
373
- b.ul {|ul| ul.add!( awards.award.process_all! )}
397
+ b = tag( 'div', 'class'=>'x2x-awards-div' ).builder
398
+ b.h2( awards.title || keyword(:Awards_Title), 'class'=>'x2x-title' )
399
+ b.ul( 'class'=>'x2x-awards' ) {|ul| ul.add!( awards.award.process_all! )}
374
400
  b
375
401
  end
376
402
 
377
403
  processor 'award' => 'AwardProcessor' do |a|
378
- t = tag( 'li' )
404
+ t = tag( 'li', 'class'=>'x2x-award' )
379
405
  t.add( [a.title, a.organization].compact.join( ', ' ) )
380
- t.add( ", ", tag( 'span', 'class'=>'date' ).add( a.date || a.period ) ) if a.date || a.period
406
+ t.add( ", ", tag( 'span', 'class'=>'x2x-date' ).add( a.date || a.period ) ) if a.date || a.period
381
407
  t.add( a.description ) if a.description
382
408
  t
383
409
  end
@@ -386,14 +412,14 @@ end
386
412
  # Referee specific elements
387
413
 
388
414
  processor 'referees' => 'RefereesProcessor' do |referees|
389
- b = tag( 'div', 'class'=>'referees' ).builder
390
- b.h2( keyword(:Referees_Title), 'class'=>'refereesTitle' )
391
- b.ul {|ul| ul.add!( referees.referee.process_all! )}
415
+ b = tag( 'div', 'class'=>'x2x-referees-div' ).builder
416
+ b.h2( keyword(:Referees_Title), 'class'=>'x2x-referees-title' )
417
+ b.ul( 'class'=>'x2x-referees' ) {|ul| ul.add!( referees.referee.process_all! )}
392
418
  b
393
419
  end
394
420
 
395
421
  processor 'referee' => 'RefereeProcessor' do |r|
396
- tag( 'li' ).add( [r.name, r.title, r.organization, r.address, r.contact].compact.join( newline ) )
422
+ tag( 'li', 'class'=>'x2x-referee' ).add( [r.name, r.title, r.organization, r.address, r.contact].compact.join( newline ) )
397
423
  end
398
424
 
399
425
  #####################################################
@@ -409,5 +435,5 @@ end
409
435
  # LastModified specific elements
410
436
 
411
437
  processor 'lastModified' => 'LastModifiedProcessor' do |l|
412
- [ keyword(:LastModified), ' ', tag( 'span', 'class'=>'date' ).add( l.date ) ]
438
+ [ keyword(:LastModified), ' ', tag( 'span', 'class'=>'x2x-date' ).add( l.date ) ]
413
439
  end
@@ -0,0 +1,72 @@
1
+ # Configuration for the resume converter -*- ruby -*-
2
+ # Language file
3
+
4
+ keyword(
5
+ # general keywords
6
+ :Resume => 'R�Á�sum�Á�',
7
+ :Of => 'of',
8
+ :In => 'in',
9
+ :And => 'and',
10
+ :AdditionalInformation => 'Additional Information',
11
+ :Phone => 'Phone',
12
+ :Phone_Home => 'Home Phone',
13
+ :Phone_Work => 'Work Phone',
14
+ :Phone_Mobile => 'Mobile Phone',
15
+ :Fax => 'Fax',
16
+ :Fax_Home => 'Home Fax',
17
+ :Fax_Work => 'Work Fax',
18
+ :Pager => 'Pager',
19
+ :IM_Aim => 'AIM',
20
+ :IM_Icq => 'ICQ',
21
+ :IM_Irc => 'IRC',
22
+ :IM_Jabber => 'Jabber',
23
+ :IM_Msn => 'MSN Messenger',
24
+ :IM_Yahoo => 'Yahoo! Messenger',
25
+ :Email => 'Email',
26
+ :Url => 'URL',
27
+ :Projects => 'Projects',
28
+ :Dates => 'Dates',
29
+ :LastModified => 'Last modified',
30
+ :Present => 'Present',
31
+
32
+ # for job history
33
+ :History_Title => 'Work Experience',
34
+ :History_Employer => 'Name and address of employer',
35
+ :History_Occupation => 'Occupation or position held',
36
+ :History_MainActivities => 'Main activities and responsibilities',
37
+ :History_Achievements => 'Achievements',
38
+
39
+ # for education
40
+ :Education_Title => 'Education And Training',
41
+ :Education_Organization => 'Name and type of organization providing education and training',
42
+ :Education_Level => 'Title of qualification awarded',
43
+ :Education_MajorStudies => 'Major Studies',
44
+ :Education_MinorStudies => 'Minor Studies',
45
+ :Education_Minor => 'minor',
46
+ :Education_Minors => 'minors',
47
+ :Education_Gpa => 'Grade Point Average (GPA)',
48
+ :Education_Gpa_Overall => 'Overall',
49
+ :Education_Gpa_Major => 'Major',
50
+ :Education_Gpa_Outof => 'out of',
51
+ :Education_Subjects => 'Subjects',
52
+
53
+ # for skills
54
+ :Skills_Title => 'Skills',
55
+
56
+ # for publications
57
+ :Publications_Title => 'Publications',
58
+ :Publications_In => 'in',
59
+
60
+ # for interests
61
+ :Interests_Title => 'Interests',
62
+
63
+ # for security clearances
64
+ :SecurityClearances_Title => 'Security Clearances',
65
+
66
+ # for awards
67
+ :Awards_Title => 'Awards',
68
+
69
+ # for referees
70
+ :Referees_Title => 'References'
71
+
72
+ )
@@ -27,19 +27,19 @@ keyword(
27
27
  :Url => 'URL',
28
28
  :Projects => 'Projets',
29
29
  :Dates => 'Dates',
30
- :LastModified => 'Dernier modification',
30
+ :LastModified => 'Dernière modification',
31
31
  :Present => 'Présent',
32
32
 
33
33
  # for job history
34
34
  :History_Title => 'Expérience Professionnelle',
35
- :History_Employer => 'Nom et adresse de l''employeur',
35
+ :History_Employer => 'Nom et adresse de l\'employeur',
36
36
  :History_Occupation => 'Fonction ou poste occupé',
37
37
  :History_MainActivities => 'Principales activités et responsabilités',
38
38
  :History_Achievements => 'Réalisations',
39
39
 
40
40
  # for education
41
- :Education_Title => 'Education et Formation',
42
- :Education_Organization => 'Nom et type de l''établissement disposant l''enseignement ou la formation',
41
+ :Education_Title => 'Éducation et Formation',
42
+ :Education_Organization => 'Nom et type de l\'établissement disposant l\'enseignement ou la formation',
43
43
  :Education_Level => 'Intitulé du certificat ou diplôme délivré',
44
44
  :Education_MajorStudies => 'Matières principales',
45
45
  :Education_MinorStudies => 'Matières secondaires',
@@ -0,0 +1,119 @@
1
+ body {
2
+ font-size: 10pt;
3
+ background-color: white ;
4
+ font-family: Verdana, sans-serif;
5
+ }
6
+
7
+ .x2x-para {
8
+ margin-bottom: 0.5ex;
9
+ margin-top: 1ex;
10
+ }
11
+
12
+ .x2x-resume {
13
+ padding-left: 1.5cm;
14
+ padding-right: 1.5cm;
15
+ }
16
+
17
+ .x2x-toc-menu {
18
+ position: absolute;
19
+ left: 0px;
20
+ top: 0px;
21
+ background-color: #ccc;
22
+ }
23
+
24
+ .x2x-toc-menu > ul {
25
+ margin: 0px;
26
+ padding: 0px;
27
+ }
28
+
29
+ .x2x-toc-menu ul li {
30
+ list-style-type: none;
31
+ position: relative;
32
+ margin: 0px;
33
+ padding: 2px 2px;
34
+ border-left: 2px solid #aaa;
35
+ }
36
+
37
+ .x2x-toc-menu ul ul {
38
+ width: 15em;
39
+ padding: 0px;
40
+ margin-left: -1px;
41
+ display: none;
42
+ border-top: 2px solid #aaa;
43
+ background-color: #ddd;
44
+ }
45
+
46
+ .x2x-toc-menu ul li:hover > ul {
47
+ display: block;
48
+ position: absolute;
49
+ top: -1px;
50
+ left: 100%;
51
+ }
52
+
53
+ .x2x-nameSection {
54
+ text-align: center;
55
+ }
56
+
57
+ .x2x-historySection > .x2x-sectionHeading,
58
+ .x2x-academicsSection > .x2x-sectionHeading,
59
+ .x2x-skillsSection > .x2x-sectionHeading,
60
+ .x2x-interestsSection > .x2x-sectionHeading,
61
+ .x2x-addInfoSection > .x2x-sectionHeading {
62
+ margin-left: -2em;
63
+ margin-right: -2em;
64
+ background-color: #4682B4;
65
+ color: white;
66
+ border-bottom: solid 1pt black;
67
+ padding-left: 0.5em;
68
+ text-transform: capitalize;
69
+ font-variant: small-caps;
70
+ letter-spacing: 0.2em;
71
+ word-spacing: 0.5em;
72
+ }
73
+
74
+ .x2x-lastModified {
75
+ font-size: 75%;
76
+ text-align: center;
77
+ }
78
+
79
+ .x2x-copyright {
80
+ font-size: 75%;
81
+ text-align: center;
82
+ }
83
+
84
+ .x2x-project > .x2x-project-title {
85
+ font-style: italic;
86
+ }
87
+
88
+ .x2x-job {
89
+ margin-top: 3ex;
90
+ border-top: 1px solid black;
91
+ }
92
+
93
+ .x2x-jobtitle {
94
+ margin-top: 0px;
95
+ margin-bottom: 0px;
96
+ }
97
+
98
+ .x2x-employer {
99
+ font-style: italic;
100
+ }
101
+
102
+ .x2x-degree {
103
+ border-top: 1px solid black;
104
+ margin-top: 3ex;
105
+ }
106
+
107
+ .x2x-degree-title {
108
+ margin-top: 0px;
109
+ margin-bottom: 0px;
110
+ }
111
+
112
+ .x2x-degree-title-other {
113
+ font-size: 75%;
114
+ font-weight: normal;
115
+ }
116
+
117
+ .x2x-institution {
118
+ font-style: italic;
119
+ }
@@ -9,6 +9,7 @@ xmlresume.sf.net</p>
9
9
  <ul>
10
10
  <li><a href="examples/example1.xml">XML source</a></li>
11
11
  <li><a href="examples/example1.pdf">PDF version</a></li>
12
+ <li><a href="examples/example1styled.html">HTML version (with stylesheet)</a></li>
12
13
  <li><a href="examples/example1.html">HTML version (without stylesheet)</a></li>
13
14
  </ul>
14
15
  </div>
@@ -18,6 +19,7 @@ xmlresume.sf.net</p>
18
19
  <ul>
19
20
  <li><a href="examples/example2.xml">XML source</a></li>
20
21
  <li><a href="examples/example2.pdf">PDF version</a></li>
22
+ <li><a href="examples/example2styled.html">HTML version (with stylesheet)</a></li>
21
23
  <li><a href="examples/example2.html">HTML version (without stylesheet)</a></li>
22
24
  </ul>
23
25
 
data/install.rb CHANGED
@@ -3,7 +3,7 @@ require 'rpa/install'
3
3
 
4
4
  class Install_xmlresume2x < RPA::Install::FullInstaller
5
5
  name 'xmlresume2x'
6
- version '0.2.0-1'
6
+ version '0.2.1-1'
7
7
  classification Application
8
8
  build do
9
9
  installdocs %w[COPYING ChangeLog TODO]
@@ -1,5 +1,5 @@
1
1
  #
2
- # $Id: converter.rb 23 2004-12-20 11:08:39Z thomas $
2
+ # $Id: converter.rb 28 2005-01-13 00:51:17Z thomas $
3
3
  #
4
4
  #--
5
5
  #
@@ -27,7 +27,7 @@ require 'xmlresume2x/processor'
27
27
 
28
28
  module XMLResume2x
29
29
 
30
- VERSION = [0, 2, 0]
30
+ VERSION = [0, 2, 1]
31
31
 
32
32
  class Converter
33
33
 
@@ -1,5 +1,5 @@
1
1
  #
2
- # $Id: processor.rb 21 2004-12-09 17:44:52Z thomas $
2
+ # $Id: processor.rb 28 2005-01-13 00:51:17Z thomas $
3
3
  #
4
4
  #--
5
5
  #
@@ -39,7 +39,7 @@ module XMLResume2x
39
39
 
40
40
  def initialize( lang )
41
41
  @lang = lang
42
- @keywords = Hash.new( '<UNDEFINED>' )
42
+ @keywords = Hash.new
43
43
  @processors = Hash.new( Proc.new {|e, options| get_children_value( e, options ) } )
44
44
  @assignments = Hash.new
45
45
  processor( :textItem => 'REXMLTextProcessor' ) {|e, options| get_value( e.value, options ) }
@@ -1,5 +1,5 @@
1
1
  #
2
- # $Id: wrapper.rb 22 2004-12-10 18:21:39Z thomas $
2
+ # $Id: wrapper.rb 27 2005-01-12 20:17:13Z thomas $
3
3
  #
4
4
  #--
5
5
  #
@@ -25,7 +25,7 @@ class Array
25
25
  alias_method :old_join, :join
26
26
  def join( sep = $, )
27
27
  if sep.instance_of?( String ) || sep.instance_of?( NilClass )
28
- old_join( sep )
28
+ self.collect {|i| i.to_s}.old_join( sep )
29
29
  else
30
30
  arr = []
31
31
  self.each_with_index {|e, i| arr << sep.clone if i > 0; arr << e}
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.1
3
3
  specification_version: 1
4
4
  name: xmlresume2x
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
7
- date: 2004-12-20
6
+ version: 0.2.1
7
+ date: 2005-01-13
8
8
  summary: Converts an xml resume to various output formats
9
9
  require_paths:
10
10
  - lib
@@ -51,10 +51,13 @@ files:
51
51
  - doc/src/download.fragment
52
52
  - data/xmlresume2x
53
53
  - data/xmlresume2x/lang
54
+ - "data/xmlresume2x/lang/#en.cfg#"
54
55
  - data/xmlresume2x/lang/de.cfg
55
56
  - data/xmlresume2x/lang/en.cfg
56
57
  - data/xmlresume2x/lang/fr.cfg
57
58
  - data/xmlresume2x/misc
59
+ - data/xmlresume2x/misc/css
60
+ - data/xmlresume2x/misc/css/blue.css
58
61
  - data/xmlresume2x/common
59
62
  - data/xmlresume2x/common/common.cfg
60
63
  - data/xmlresume2x/format