roo 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@
33
33
  <h1>roo</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/roo"; return false'>
35
35
  Get Version
36
- <a href="http://rubyforge.org/projects/roo" class="numbers">0.2.3</a>
36
+ <a href="http://rubyforge.org/projects/roo" class="numbers">0.2.4</a>
37
37
  </div>
38
38
  <h2>What</h2>
39
39
 
@@ -61,7 +61,7 @@
61
61
  <p>Supposed you have created this spreadsheet:</p>
62
62
 
63
63
 
64
- <p><img src="Screenshot-spreadsheet.png"></p>
64
+ <p><img src="Screenshot-spreadsheet3.png"></p>
65
65
 
66
66
 
67
67
  <p>which includes the amount of work you have done for a customer.</p>
@@ -77,24 +77,20 @@
77
77
  3
78
78
  4 HOURLY_RATE = 123.45
79
79
  5
80
- 6 oo = Openoffice.new("/home/tp/Desktop/simple_spreadsheet.ods")
80
+ 6 oo = Openoffice.new("simple_spreadsheet.ods")
81
81
  7 oo.default_sheet = oo.sheets.first
82
- 8 4.upto(1000) do |line|
83
- 9 # puts "line: "+line.to_s
84
- 10 date = oo.cell(line,'A')
85
- 11 start_time = oo.cell(line,'B')
86
- 12 start_time = 0.0 unless start_time
87
- 13 end_time = oo.cell(line,'C')
88
- 14 end_time = 0.0 unless end_time
89
- 15 pause = oo.cell(line,'D')
90
- 16 pause = 0.0 unless pause
91
- 17 sum = (end_time-start_time)-pause
92
- 18 comment = oo.cell(line,'F')
93
- 19 amount = sum * HOURLY_RATE
94
- 20 if date
95
- 21 puts "#{date}\t#{sum}\t#{amount}\t#{comment}"
96
- 22 end
97
- 23 end
82
+ 8 4.upto(12) do |line|
83
+ 9 date = oo.cell(line,'A')
84
+ 10 start_time = oo.cell(line,'B')
85
+ 11 end_time = oo.cell(line,'C')
86
+ 12 pause = oo.cell(line,'D')
87
+ 13 sum = (end_time - start_time) - pause
88
+ 14 comment = oo.cell(line,'F')
89
+ 15 amount = sum * HOURLY_RATE
90
+ 16 if date
91
+ 17 puts "#{date}\t#{sum}\t#{amount}\t#{comment}"
92
+ 18 end
93
+ 19 end
98
94
  </code>
99
95
  </pre>
100
96
 
@@ -103,22 +99,15 @@
103
99
 
104
100
  <pre>
105
101
  <code>
106
- 2007-05-07 1.75 216.0375 lokale lauff��hige Umgebung aufgesetzt, Datenbank eingerichtet, Repository erstellt und anf��nglichen Sourcecode eingestellt
107
- 2007-05-07 1.0 123.45 Userstories erfasst
108
- 2007-05-08 1.0 123.45 Test neuen User anlegen, Perioden (��berschneidend) anzulegen
109
- 2007-05-08 1.0 123.45 Bestandsaufnahme/Aufwandssch��tzung/Korrespondenz
110
- 2007-05-08 0.5 61.725 Functional Test Ueberschneidung
111
- 2007-05-14 0.5 61.725
112
- 2007-05-14 0.5 61.725
113
- 2007-05-15 1.0 123.45
114
- 2007-05-15 0.75 92.5875 G��stebuch
115
- 2007-05-15 0.5 61.725 G��stebuch
116
- 2007-05-15 0.5 61.725 G��stebuch
117
- 2007-05-16 1.0 123.45 G��stebuch
118
- 2007-05-17 0.25 30.8625 G��stebuch
119
- 2007-05-17 1.25 154.3125 G��stebuch
120
- 2007-05-18 3.0 370.35 G��stebuch
121
- 2007-05-18 1.75 216.0375 G��stebuch
102
+ 2007-05-07 1.0 123.45 Task 1
103
+ 2007-05-07 1.75 216.0375 Task 1
104
+ 2007-05-07 1.0 123.45 Task 2
105
+ 2007-05-08 1.0 123.45 Task 2
106
+ 2007-05-08 1.0 123.45 Task 3
107
+ 2007-05-08 0.5 61.725 Task 3
108
+ 2007-05-14 0.5 61.725 Task 3
109
+ 2007-05-14 0.5 61.725 Task 3
110
+ 2007-05-15 1.0 123.45 Task 3
122
111
  </code>
123
112
  </pre>
124
113
 
@@ -135,7 +124,7 @@
135
124
 
136
125
  <pre>
137
126
  <code>
138
- 8 4.upto(1000) do |line|
127
+ 4.upto(12) do |line|
139
128
  </code>
140
129
  </pre>
141
130
 
@@ -144,7 +133,7 @@
144
133
 
145
134
  <pre>
146
135
  <code>
147
- 8 4.upto(oo.last_row) do |line|
136
+ 4.upto(oo.last_row) do |line|
148
137
  </code>
149
138
  </pre>
150
139
 
@@ -156,7 +145,7 @@
156
145
 
157
146
  Replace Openoffice with
158
147
  <pre>
159
- <code>oo = Excel.new("/home/tp/Desktop/simple_spreadsheet.xls").
148
+ <code>oo = Excel.new("simple_spreadsheet.xls").
160
149
 
161
150
  </code>
162
151
  </pre>
@@ -206,10 +195,11 @@ is the setting of the default-worksheet. OpenOffice uses the name of the workshe
206
195
 
207
196
  <ul>
208
197
  <li><a href="http://rubyforge.org/users/nicwilliams/">Dr Nic Williams</a> for his wonderful gem &#8216;<a href="http://rubyforge.org/projects/newgem/">newgem</a>&#8217; which makes it very convenient to create, manage and publish Ruby gems</li>
209
- <li>for the Excel-part the &#8216;parseexcel&#8217; gem is used. My functions are a convenient wrapper around the functions of this gem</li>
198
+ <li>for the Excel-part the &#8220;spreadsheet&#8217;:http://rubyforge.org/projects/spreadsheet/ gem is used. My functions are a convenient wrapper around the functions of this gem</li>
199
+ <li>Dirk Huth f&uuml;rs Testen unter Windows</li>
210
200
  </ul>
211
201
  <p class="coda">
212
- <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 1st June 2007<br>
202
+ <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 5th June 2007<br>
213
203
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
214
204
  </p>
215
205
  </div>
@@ -18,7 +18,7 @@ h2. Demonstration of usage
18
18
 
19
19
  Supposed you have created this spreadsheet:
20
20
 
21
- <img src="Screenshot-spreadsheet.png">
21
+ <img src="Screenshot-spreadsheet3.png">
22
22
 
23
23
  which includes the amount of work you have done for a customer.
24
24
 
@@ -31,24 +31,20 @@ You can now process this spreadsheet with the following sample code.
31
31
  3
32
32
  4 HOURLY_RATE = 123.45
33
33
  5
34
- 6 oo = Openoffice.new("/home/tp/Desktop/simple_spreadsheet.ods")
34
+ 6 oo = Openoffice.new("simple_spreadsheet.ods")
35
35
  7 oo.default_sheet = oo.sheets.first
36
- 8 4.upto(1000) do |line|
37
- 9 # puts "line: "+line.to_s
38
- 10 date = oo.cell(line,'A')
39
- 11 start_time = oo.cell(line,'B')
40
- 12 start_time = 0.0 unless start_time
41
- 13 end_time = oo.cell(line,'C')
42
- 14 end_time = 0.0 unless end_time
43
- 15 pause = oo.cell(line,'D')
44
- 16 pause = 0.0 unless pause
45
- 17 sum = (end_time-start_time)-pause
46
- 18 comment = oo.cell(line,'F')
47
- 19 amount = sum * HOURLY_RATE
48
- 20 if date
49
- 21 puts "#{date}\t#{sum}\t#{amount}\t#{comment}"
50
- 22 end
51
- 23 end
36
+ 8 4.upto(12) do |line|
37
+ 9 date = oo.cell(line,'A')
38
+ 10 start_time = oo.cell(line,'B')
39
+ 11 end_time = oo.cell(line,'C')
40
+ 12 pause = oo.cell(line,'D')
41
+ 13 sum = (end_time - start_time) - pause
42
+ 14 comment = oo.cell(line,'F')
43
+ 15 amount = sum * HOURLY_RATE
44
+ 16 if date
45
+ 17 puts "#{date}\t#{sum}\t#{amount}\t#{comment}"
46
+ 18 end
47
+ 19 end
52
48
  </code>
53
49
  </pre>
54
50
 
@@ -56,22 +52,15 @@ which produces this output
56
52
 
57
53
  <pre>
58
54
  <code>
59
- 2007-05-07 1.75 216.0375 lokale lauff��hige Umgebung aufgesetzt, Datenbank eingerichtet, Repository erstellt und anf��nglichen Sourcecode eingestellt
60
- 2007-05-07 1.0 123.45 Userstories erfasst
61
- 2007-05-08 1.0 123.45 Test neuen User anlegen, Perioden (��berschneidend) anzulegen
62
- 2007-05-08 1.0 123.45 Bestandsaufnahme/Aufwandssch��tzung/Korrespondenz
63
- 2007-05-08 0.5 61.725 Functional Test Ueberschneidung
64
- 2007-05-14 0.5 61.725
65
- 2007-05-14 0.5 61.725
66
- 2007-05-15 1.0 123.45
67
- 2007-05-15 0.75 92.5875 G��stebuch
68
- 2007-05-15 0.5 61.725 G��stebuch
69
- 2007-05-15 0.5 61.725 G��stebuch
70
- 2007-05-16 1.0 123.45 G��stebuch
71
- 2007-05-17 0.25 30.8625 G��stebuch
72
- 2007-05-17 1.25 154.3125 G��stebuch
73
- 2007-05-18 3.0 370.35 G��stebuch
74
- 2007-05-18 1.75 216.0375 G��stebuch
55
+ 2007-05-07 1.0 123.45 Task 1
56
+ 2007-05-07 1.75 216.0375 Task 1
57
+ 2007-05-07 1.0 123.45 Task 2
58
+ 2007-05-08 1.0 123.45 Task 2
59
+ 2007-05-08 1.0 123.45 Task 3
60
+ 2007-05-08 0.5 61.725 Task 3
61
+ 2007-05-14 0.5 61.725 Task 3
62
+ 2007-05-14 0.5 61.725 Task 3
63
+ 2007-05-15 1.0 123.45 Task 3
75
64
  </code>
76
65
  </pre>
77
66
 
@@ -86,7 +75,7 @@ you can change line 8 from
86
75
 
87
76
  <pre>
88
77
  <code>
89
- 8 4.upto(1000) do |line|
78
+ 4.upto(12) do |line|
90
79
  </code>
91
80
  </pre>
92
81
 
@@ -94,7 +83,7 @@ to
94
83
 
95
84
  <pre>
96
85
  <code>
97
- 8 4.upto(oo.last_row) do |line|
86
+ 4.upto(oo.last_row) do |line|
98
87
  </code>
99
88
  </pre>
100
89
 
@@ -104,7 +93,7 @@ You can also access MS-Excel spreadsheat.
104
93
 
105
94
  Replace Openoffice with
106
95
  <pre>
107
- <code>oo = Excel.new("/home/tp/Desktop/simple_spreadsheet.xls").
96
+ <code>oo = Excel.new("simple_spreadsheet.xls").
108
97
 
109
98
  </code>
110
99
  </pre>
@@ -140,4 +129,5 @@ Comments are welcome. Send an email to "Thomas Preymesser":mailto:thopre@gmail.c
140
129
  h2. Thanks
141
130
 
142
131
  * "Dr Nic Williams":http://rubyforge.org/users/nicwilliams/ for his wonderful gem '"newgem":http://rubyforge.org/projects/newgem/' which makes it very convenient to create, manage and publish Ruby gems
143
- * for the Excel-part the 'parseexcel' gem is used. My functions are a convenient wrapper around the functions of this gem
132
+ * for the Excel-part the "spreadsheet':http://rubyforge.org/projects/spreadsheet/ gem is used. My functions are a convenient wrapper around the functions of this gem
133
+ * Dirk Huth f&uuml;rs Testen unter Windows
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: roo
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.3
7
- date: 2007-06-02 00:00:00 +02:00
6
+ version: 0.2.4
7
+ date: 2007-06-17 00:00:00 +02:00
8
8
  summary: roo can access the contents of OpenOffice-Spreadsheets
9
9
  require_paths:
10
10
  - lib
@@ -38,6 +38,7 @@ files:
38
38
  - lib/roo/version.rb
39
39
  - lib/roo/openoffice.rb
40
40
  - lib/roo/excel.rb
41
+ - lib/roo/google.rb
41
42
  - scripts/txt2html
42
43
  - setup.rb
43
44
  - test/test_helper.rb
@@ -86,3 +87,12 @@ dependencies:
86
87
  - !ruby/object:Gem::Version
87
88
  version: 0.9.1
88
89
  version:
90
+ - !ruby/object:Gem::Dependency
91
+ name: hpricot
92
+ version_requirement:
93
+ version_requirements: !ruby/object:Gem::Version::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: "0.5"
98
+ version: