rresume 0.0.3 → 0.1.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.
@@ -1,13 +1,15 @@
1
1
  #require 'project'
2
2
  #require 'duration'
3
+ #require 'output'
4
+
3
5
  class String
4
6
  def to_html
5
- self.gsub!(/�/,"ä")
7
+ gsub!(/�/,"ä")
6
8
  gsub!(/�/,"ö")
7
9
  gsub!(/�/,"ü")
8
10
  gsub!(/�/,"Ä")
9
11
  gsub!(/�/,"Ö")
10
- gsub!(/U/,"Ü")
12
+ gsub!(/�/,"Ü")
11
13
  gsub!(/�/,"ß")
12
14
  gsub!(/</,"&lt;")
13
15
  gsub!(/>/,"&gt;")
@@ -16,21 +18,15 @@ class String
16
18
  end # String
17
19
 
18
20
  class ProjectList
19
- include Duration
21
+ #include Duration
22
+ #include Output
20
23
 
21
- def initialize(person)
22
- @person = person
24
+ def initialize(person=nil)
23
25
  @projects = []
24
26
  end
25
27
 
26
- def << (project)
27
- @projects << project
28
- end
29
-
30
- def list
31
- @projects.each {|p|
32
- puts p
33
- }
28
+ def sort
29
+ @projects.sort
34
30
  end
35
31
 
36
32
  # output personal data like schools, universities, diplomas, etc.
@@ -114,7 +110,7 @@ tmpl = TemplateText.new <<END
114
110
  </HEAD>
115
111
 
116
112
  <BODY BACKGROUND="" BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800080" ALINK="#ff0000">
117
- als <a href="profil.pdf">PDF</a> anzeigen
113
+
118
114
  #{dokument_source}
119
115
 
120
116
  <p>
@@ -241,10 +237,23 @@ END
241
237
  }
242
238
 
243
239
  tmpl.prettyprint = true
244
- tmpl.expand(STDOUT, data)
240
+ #tmpl.expand(STDOUT, data)
241
+ tmpl.expand($stdout, data)
242
+ end
243
+
244
+
245
+ def << (project)
246
+ @projects << project
247
+ end
248
+
249
+ def list
250
+ @projects.each {|p|
251
+ puts p
252
+ }
245
253
  end
246
254
 
247
255
  def output (newest_first = true, mode=nil)
256
+ printf($stderr,"warning: ProjectList#output ist veraltet, bitte benutze stattdessen die Methode Person#write ")
248
257
  puts "<h1>" if mode == :html
249
258
  puts "Projekte"
250
259
  puts "</h1>" if mode == :html
@@ -272,6 +281,7 @@ END
272
281
  end
273
282
 
274
283
  def output_category (category, mode=:text)
284
+ printf($stderr,"warning: ProjectList#output_category ist veraltet, bitte benutze stattdessen die Methode Person#write ")
275
285
  array1 = []
276
286
  category[1].sort.each {|tool|
277
287
  monate = total_for(tool)
@@ -303,7 +313,8 @@ END
303
313
  :table1=>array1
304
314
  }
305
315
  tmpl.prettyprint = true
306
- tmpl.expand(STDOUT, data)
316
+ #tmpl.expand(STDOUT, data)
317
+ tmpl.expand($stdout, data)
307
318
  #f = File.open("hula#{cate[0]}.html","w")
308
319
  end
309
320
 
@@ -346,18 +357,4 @@ END
346
357
  "#{last_month.to_s}/#{last_year.to_s}"
347
358
  end
348
359
 
349
- private
350
-
351
- #def human_months(months)
352
- #if months > 12
353
- #"> "+jahre(months).to_s+" Jahre"
354
- #else
355
- #months.to_s+" Monate"
356
- #end
357
- #end
358
-
359
- #def jahre(monate)
360
- #monate/12.0.round
361
- #end
362
-
363
360
  end
@@ -0,0 +1,212 @@
1
+ # output personal data like schools, universities, diplomas, etc.
2
+ def output_personal(*args)
3
+ verfuegbarkeit=<<END
4
+ Verf&uuml;gbarkeit: In den als frei gekennzeichneten Monaten bin ich aktuell
5
+ noch verf&uuml;gbar. In den anderen bin ich ganz oder teilweise
6
+ gebucht. Ggf. gibt es aber auch da M&ouml;glichkeiten einer Zusammenarbeit,
7
+ falls es sich um kleinere Aufgaben handelt.
8
+ <p>
9
+ <table border="1" width="100%">
10
+ <tr>
11
+ <td><b>Verf&uuml;gbarkeit</b> </td>
12
+ <td>01 </td>
13
+ <td>02 </td>
14
+ <td>03 </td>
15
+ <td>04 </td>
16
+ <td>05 </td>
17
+ <td>06 </td>
18
+ <td>07 </td>
19
+ <td>08 </td>
20
+ <td>09 </td>
21
+ <td>10 </td>
22
+ <td>11 </td>
23
+ <td>12 </td>
24
+ </tr>
25
+ <tr>
26
+ <td>2006</td>
27
+ <!-- 01 --> <td bgcolor="lightgreen">frei </td>
28
+ <!-- 02 --> <td bgcolor="lightgreen">frei </td>
29
+ <!-- 03 --> <td bgcolor="lightgreen">frei </td>
30
+ <!-- 04 --> <td bgcolor="lightgreen">frei </td>
31
+ <!-- 05 --> <td bgcolor="lightgreen">frei </td>
32
+ <!-- 06 --> <td bgcolor="black"><font color="white">gebucht</font></td>
33
+ <!-- 07 --> <td bgcolor="black"><font color="white">gebucht</font></td>
34
+ <!-- 08 --> <td bgcolor="black"><font color="white">gebucht</font></td>
35
+ <!-- 09 --> <td bgcolor="lightgreen">frei </td>
36
+ <!-- 10 --> <td bgcolor="lightgreen">frei </td>
37
+ <!-- 11 --> <td bgcolor="lightgreen">frei </td>
38
+ <!-- 12 --> <td bgcolor="lightgreen">frei </td>
39
+ </tr>
40
+ <tr>
41
+ <td>2007</td>
42
+ <!-- 01 --> <td bgcolor="lightgreen">frei </td>
43
+ <!-- 02 --> <td bgcolor="lightgreen">frei </td>
44
+ <!-- 03 --> <td bgcolor="lightgreen">frei </td>
45
+ <!-- 04 --> <td bgcolor="lightgreen">frei </td>
46
+ <!-- 05 --> <td bgcolor="lightgreen">frei </td>
47
+ <!-- 06 --> <td bgcolor="lightgreen">frei </td>
48
+ <!-- 07 --> <td bgcolor="lightgreen">frei </td>
49
+ <!-- 08 --> <td bgcolor="lightgreen">frei </td>
50
+ <!-- 09 --> <td bgcolor="lightgreen">frei </td>
51
+ <!-- 10 --> <td bgcolor="lightgreen">frei </td>
52
+ <!-- 11 --> <td bgcolor="lightgreen">frei </td>
53
+ <!-- 12 --> <td bgcolor="lightgreen">frei </td>
54
+ </tr>
55
+ </table>
56
+ END
57
+
58
+ if !args.include?(:mit_verfuegbarkeit)
59
+ verfuegbarkeit=""
60
+ end
61
+
62
+ dokument_source=<<__END__
63
+ Dokument: <code>
64
+ <a href="http://www.thopre.de/profil.html">
65
+ http://www.thopre.de/profil.html
66
+ </a>
67
+ </code>
68
+ __END__
69
+ #!!!
70
+ dokument_source=<<__END__
71
+ __END__
72
+
73
+ tmpl = TemplateText.new <<END
74
+
75
+ <HTML>
76
+
77
+ <HEAD>
78
+ <TITLE>Profil #{@firstname} #{@lastname}</TITLE>
79
+ </HEAD>
80
+
81
+ <BODY BACKGROUND="" BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800080" ALINK="#ff0000">
82
+
83
+ #{dokument_source}
84
+
85
+ <p>
86
+ <TABLE BORDER="1" WIDTH="100%" cellpadding="5">
87
+ <TR>
88
+ <TD valign="top">
89
+ <B>Profil</B> von<BR>
90
+ #{@firstname} #{@lastname}<br>
91
+ Stand: #{DateTime.now.to_s[0,10]}<br>
92
+ </TD>
93
+ <TD>
94
+ #{@adresse}<br>
95
+ #{@plz} #{@ort}<br>
96
+ Tel.: #{@telefon}<BR>
97
+ </TD>
98
+ <TD valign="top">
99
+ mobile: #{@mobil}<BR>
100
+ email: <a href="mailto:#{@email}">#{@email}</a><BR>
101
+
102
+ </TD>
103
+ </TR>
104
+ </TABLE>
105
+
106
+
107
+ <ol>
108
+ <li><a href="#hw">Hardware</a>
109
+ <li><a href="#bs">Betriebssysteme</a>
110
+ <li><a href="#db">Datenbanken</a>
111
+ <li><a href="#to">Tools / Sonstiges</a>
112
+ <li><a href="#la">Programmiersprachen</a>
113
+ <li><a href="#pr">Projekte</a>
114
+ </ol>
115
+ <hr>
116
+
117
+ <H1>Aktuelles</H1>
118
+
119
+ #{verfuegbarkeit}
120
+
121
+ <p>
122
+
123
+ <TABLE border="1" cellspacing="0" cellpadding="4">
124
+ <TR>
125
+ <TD >
126
+ <B>
127
+ bevorzugter Einsatzort:
128
+ </B>
129
+ </TD>
130
+ <TD >
131
+ Raum Berlin.
132
+ </TD>
133
+ </TR>
134
+ <TR>
135
+ <TD >
136
+ <B>
137
+ Stundensatz:
138
+ </B>
139
+ </TD>
140
+ <TD >
141
+ <!-- 70 &#8364;/h zuz&uuml;gl. MwSt.
142
+ -->
143
+ nach Vereinbarung
144
+ </TD>
145
+
146
+ </TR>
147
+ </TABLE>
148
+
149
+ <A NAME="link"><H1>Pers&ouml;nliche Daten</H1></A>
150
+ <TABLE width="95%" border="0" cellspacing="0" cellpadding="4">
151
+ <TR>
152
+ <!-- Row 1 Column 1 -->
153
+ <TD >
154
+ <B>
155
+ Geburtsdatum:
156
+ </B>
157
+ </TD>
158
+ <!-- Row 1 Column 2 -->
159
+ <TD >
160
+ 1961-11-21
161
+ </TD>
162
+ </TR>
163
+ <TR>
164
+ <!-- Row 2 Column 1 -->
165
+ <TD valign="top">
166
+ <B>
167
+ Ausbildung:
168
+ </B>
169
+ </TD>
170
+ <!-- Row 2 Column 2 -->
171
+ <TD >
172
+ <div id="educations"></div>
173
+ </TD>
174
+ </TR>
175
+ <TR>
176
+ <TD >
177
+ <B>
178
+ Fortbildung:
179
+ </B>
180
+ </TD>
181
+ <TD >
182
+ <div id="weiterbildungen"></div>
183
+ </TD>
184
+ </TR>
185
+ <TR>
186
+ <TD valign="top">
187
+ <B>
188
+ Fremdsprachen:
189
+ </B>
190
+ </TD>
191
+ <TD >
192
+ <div id="fremdsprachen"></div>
193
+ </TD>
194
+ </TR>
195
+ </TABLE>
196
+
197
+ END
198
+ puts "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">"
199
+ array1 = @education_list
200
+ array2 = @weiterbildungen
201
+ array3 = @fremdsprachen
202
+ data = {
203
+ :educations => array1,
204
+ :weiterbildungen => array2,
205
+ :fremdsprachen => array3,
206
+ }
207
+
208
+ tmpl.prettyprint = true
209
+ #tmpl.expand(STDOUT, data)
210
+ tmpl.expand($stdout, data)
211
+ end
212
+
@@ -2,7 +2,7 @@
2
2
  #require 'duration'
3
3
  class String
4
4
  def to_html
5
- self.gsub!(/�/,"&auml;")
5
+ gsub!(/�/,"&auml;")
6
6
  gsub!(/�/,"&ouml;")
7
7
  gsub!(/�/,"&uuml;")
8
8
  gsub!(/�/,"&Auml;")
@@ -35,56 +35,7 @@ class ProjectList
35
35
 
36
36
  # output personal data like schools, universities, diplomas, etc.
37
37
  def output_personal(*args)
38
- tmpl = TemplateText.new <<END
39
-
40
- <HTML>
41
-
42
- <HEAD>
43
- <TITLE>Profil #{@person.firstname} #{@person.lastname}</TITLE>
44
- </HEAD>
45
-
46
- <BODY BACKGROUND="" BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800080" ALINK="#ff0000">
47
-
48
- Dokument: <code>
49
- <a href="http://www.thopre.de/profil.html">
50
- http://www.thopre.de/profil.html
51
- </a>
52
- </code>
53
-
54
- <p>
55
- <TABLE BORDER="1" WIDTH="100%" cellpadding="5">
56
- <TR>
57
- <TD valign="top">
58
- <B>Profil</B> von<BR>
59
- #{@person.firstname} #{@person.lastname}<br>
60
- Stand: #{DateTime.now.to_s[0,10]}<br>
61
- </TD>
62
- <TD>
63
- #{@person.adresse}<br>
64
- #{@person.plz} #{@person.ort}<br>
65
- Tel.: #{@person.telefon}<BR>
66
- </TD>
67
- <TD valign="top">
68
- mobile: #{@person.mobil}<BR>
69
- email: <a href="mailto:#{@person.email}">#{@person.email}</a><BR>
70
-
71
- </TD>
72
- </TR>
73
- </TABLE>
74
-
75
-
76
- <ol>
77
- <li><a href="#hw">Hardware</a>
78
- <li><a href="#bs">Betriebssysteme</a>
79
- <li><a href="#db">Datenbanken</a>
80
- <li><a href="#to">Tools / Sonstiges</a>
81
- <li><a href="#la">Programmiersprachen</a>
82
- <li><a href="#pr">Projekte</a>
83
- </ol>
84
- <hr>
85
-
86
- <H1>Aktuelles</H1>
87
-
38
+ verfuegbarkeit=<<END
88
39
  Verf&uuml;gbarkeit: In den als frei gekennzeichneten Monaten bin ich aktuell
89
40
  noch verf&uuml;gbar. In den anderen bin ich ganz oder teilweise
90
41
  gebucht. Ggf. gibt es aber auch da M&ouml;glichkeiten einer Zusammenarbeit,
@@ -137,6 +88,70 @@ falls es sich um kleinere Aufgaben handelt.
137
88
  <!-- 12 --> <td bgcolor="lightgreen">frei </td>
138
89
  </tr>
139
90
  </table>
91
+ END
92
+
93
+ if !args.include?(:mit_verfuegbarkeit)
94
+ verfuegbarkeit=""
95
+ end
96
+
97
+ dokument_source=<<__END__
98
+ Dokument: <code>
99
+ <a href="http://www.thopre.de/profil.html">
100
+ http://www.thopre.de/profil.html
101
+ </a>
102
+ </code>
103
+ __END__
104
+ #!!!
105
+ dokument_source=<<__END__
106
+ __END__
107
+
108
+ tmpl = TemplateText.new <<END
109
+
110
+ <HTML>
111
+
112
+ <HEAD>
113
+ <TITLE>Profil #{@person.firstname} #{@person.lastname}</TITLE>
114
+ </HEAD>
115
+
116
+ <BODY BACKGROUND="" BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800080" ALINK="#ff0000">
117
+
118
+ #{dokument_source}
119
+
120
+ <p>
121
+ <TABLE BORDER="1" WIDTH="100%" cellpadding="5">
122
+ <TR>
123
+ <TD valign="top">
124
+ <B>Profil</B> von<BR>
125
+ #{@person.firstname} #{@person.lastname}<br>
126
+ Stand: #{DateTime.now.to_s[0,10]}<br>
127
+ </TD>
128
+ <TD>
129
+ #{@person.adresse}<br>
130
+ #{@person.plz} #{@person.ort}<br>
131
+ Tel.: #{@person.telefon}<BR>
132
+ </TD>
133
+ <TD valign="top">
134
+ mobile: #{@person.mobil}<BR>
135
+ email: <a href="mailto:#{@person.email}">#{@person.email}</a><BR>
136
+
137
+ </TD>
138
+ </TR>
139
+ </TABLE>
140
+
141
+
142
+ <ol>
143
+ <li><a href="#hw">Hardware</a>
144
+ <li><a href="#bs">Betriebssysteme</a>
145
+ <li><a href="#db">Datenbanken</a>
146
+ <li><a href="#to">Tools / Sonstiges</a>
147
+ <li><a href="#la">Programmiersprachen</a>
148
+ <li><a href="#pr">Projekte</a>
149
+ </ol>
150
+ <hr>
151
+
152
+ <H1>Aktuelles</H1>
153
+
154
+ #{verfuegbarkeit}
140
155
 
141
156
  <p>
142
157
 
@@ -226,7 +241,8 @@ END
226
241
  }
227
242
 
228
243
  tmpl.prettyprint = true
229
- tmpl.expand(STDOUT, data)
244
+ #tmpl.expand(STDOUT, data)
245
+ tmpl.expand($stdout, data)
230
246
  end
231
247
 
232
248
  def output (newest_first = true, mode=nil)
@@ -288,12 +304,13 @@ END
288
304
  :table1=>array1
289
305
  }
290
306
  tmpl.prettyprint = true
291
- tmpl.expand(STDOUT, data)
307
+ #tmpl.expand(STDOUT, data)
308
+ tmpl.expand($stdout, data)
292
309
  #f = File.open("hula#{cate[0]}.html","w")
293
310
  end
294
311
 
295
312
  def output_werbung(mode=:text)
296
- puts "<br>generated with Ruby <a href=\"http://www.thopre.de/rresume.html\">rresume</a>" if mode == :html
313
+ puts "<br>generated with <a href=\"http://www.thopre.de/rresume/\">rresume</a>" if mode == :html
297
314
  end
298
315
 
299
316
  def total_for(wanted)