roo 1.2.0 → 1.2.1
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.
- data/History.txt +3 -0
- data/Manifest.txt +2 -0
- data/lib/roo/excel.rb +89 -102
- data/lib/roo/excelx.rb +14 -18
- data/lib/roo/generic_spreadsheet.rb +29 -7
- data/lib/roo/google.rb +2 -0
- data/lib/roo/openoffice.rb +33 -16
- data/lib/roo/version.rb +1 -1
- data/test/datetime.ods +0 -0
- data/test/datetime.xls +0 -0
- data/test/test_helper.rb +1 -1
- data/test/test_roo.rb +754 -227
- data/website/index.html +29 -10
- data/website/index.txt +7 -1
- metadata +6 -4
data/website/index.html
CHANGED
@@ -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">1.1
|
36
|
+
<a href="http://rubyforge.org/projects/roo" class="numbers">1.2.1</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
<p>This gem allows you to access the content of</p>
|
@@ -58,6 +58,17 @@ mitgeteilt, werde ich dich nach deinem Namen, soweit aus der Email-Adresse<br />
|
|
58
58
|
ersichtlich, in der Liste veröffenlichen. Falls etwas anderes gewünscht wird,<br />
|
59
59
|
z. B. “Firma <span class="caps">ABC</span> GmbH” oder anonym, dann teile mir dies bitte mit!</p>
|
60
60
|
<h3>Spender</h3>
|
61
|
+
<h4>Juli-September 2008</h4>
|
62
|
+
<table>
|
63
|
+
<tr>
|
64
|
+
<td>Betrag</td>
|
65
|
+
<td>Name</td>
|
66
|
+
</tr>
|
67
|
+
<tr>
|
68
|
+
<td>-</td>
|
69
|
+
<td>-</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
61
72
|
<h4>April-Juni 2008</h4>
|
62
73
|
<table>
|
63
74
|
<tr>
|
@@ -65,8 +76,8 @@ z. B. “Firma <span class="caps">ABC</span> GmbH” oder anonym, dann t
|
|
65
76
|
<td>Name</td>
|
66
77
|
</tr>
|
67
78
|
<tr>
|
68
|
-
<td
|
69
|
-
<td
|
79
|
+
<td>-</td>
|
80
|
+
<td>-</td>
|
70
81
|
</tr>
|
71
82
|
</table>
|
72
83
|
<h2>Installing</h2>
|
@@ -74,7 +85,7 @@ z. B. “Firma <span class="caps">ABC</span> GmbH” oder anonym, dann t
|
|
74
85
|
<h2>The basics</h2>
|
75
86
|
<p>Currently only read-access is implemented.<br />
|
76
87
|
Google spreadsheets can be read and written.</p>
|
77
|
-
<p>Please note that the upper left cell of a table is numbered (1,1) or (1,&#
|
88
|
+
<p>Please note that the upper left cell of a table is numbered (1,1) or (1,‘A’) (not 0,0).</p>
|
78
89
|
<h2>Demonstration of usage</h2>
|
79
90
|
<p>Supposed you have created this spreadsheet:</p>
|
80
91
|
<p><img src="Screenshot-spreadsheet3.png"></p>
|
@@ -154,7 +165,7 @@ range from 0.0 to 1.0.</p>
|
|
154
165
|
value of this formula. The formula itself can be retrieved with the #formula<br />
|
155
166
|
method.</p>
|
156
167
|
<p>Time values are returned as type :time – the value of the cell are the seconds<br />
|
157
|
-
from midnight
|
168
|
+
from midnight as a Fixnum object</p>
|
158
169
|
<h3>Write access</h3>
|
159
170
|
<p>Cells in a google spreadsheet can be read or written.</p>
|
160
171
|
<p>To write to a cell use the method call:</p>
|
@@ -185,11 +196,11 @@ If there is no formula in this cell nil is returned.</p>
|
|
185
196
|
</pre>
|
186
197
|
<p>Each entry consists of the elements row, col, formula.</p>
|
187
198
|
<p>Note: oo.<strong>cell</strong>(row,col) is the same for ordinary cells and formulas. So you can use the computated value of a formula. If you have to distinguish if a cell is a formula use #<strong>formula</strong>?</p>
|
188
|
-
<p>Please note: formulas in Excel-Spreadsheets cannot be handled (this is another gem, see:
|
199
|
+
<p>Please note: formulas in Excel-Spreadsheets cannot be handled (this is another gem, see: “Thanks”)</p>
|
189
200
|
<h3><span class="caps">YAML</span>-Output</h3>
|
190
201
|
<p>You can generate <span class="caps">YAML</span>-Output from your spreadsheet data. The method is called:</p>
|
191
202
|
<p>oo.to_yaml # => produces <span class="caps">YAML</span> output from the entire default spreadsheet<br />
|
192
|
-
oo.to_yaml({"myattribute1" => “myvalue1”, “myattribute2” =>
|
203
|
+
oo.to_yaml({"myattribute1" => “myvalue1”, “myattribute2” => “myvalue2”)<br />
|
193
204
|
# => <span class="caps">YAML</span> output with additional attributes<br />
|
194
205
|
oo.to_yaml({..}, 2,10, 300,10) # => only the rectangle from row 2, column 10 to row 300, column 10 will be returned</p>
|
195
206
|
<p>If you omit one or more parameters the maximum boundaries of your spreadsheet will be used.</p>
|
@@ -263,7 +274,8 @@ the Google-name and -password to the Google#new method.</p>
|
|
263
274
|
~/.bashrc (or similar setup file within other shells):</p>
|
264
275
|
export GOOGLE_MAIL=“yourname@gmail.com”
|
265
276
|
export GOOGLE_PASSWORD=“mysecretpassword”
|
266
|
-
|
277
|
+
|
278
|
+
<p>This gem does not check if you are allowed to access a specific google spreadsheet. If it’s not your own spreadsheet or you are not allowed to read or write to a spreadsheet the behaviour is not defined (but it will not work ;-) ).</p>
|
267
279
|
<p>The default behavior at opening a spreadsheet with a certain extension has been <br />
|
268
280
|
changed.<br />
|
269
281
|
Say you’re trying to open a spreadsheet file with the extension .xls, which is normally<br />
|
@@ -283,6 +295,12 @@ program will try to handle the file with this class (of course this will fail, i
|
|
283
295
|
is really of the false type).</p>
|
284
296
|
<p>If you completely know what you are doing you can also disable the warning with the<br />
|
285
297
|
parameter :ignore.</p>
|
298
|
+
<p>Temporary files of this gem are stored in directories which are named with ‘oo_’ and<br />
|
299
|
+
a number (the <span class="caps">PID</span> of the current process).<br />
|
300
|
+
These directories are created within the current working directory. If you want to<br />
|
301
|
+
use a different directory for temporary files set the environment variable ROO_TMP! (for<br />
|
302
|
+
example “export ROO_TMP=/tmp” in your .bashrc file). <br />
|
303
|
+
ROO_TMP was introduced in releases >1.1.0.</p>
|
286
304
|
<h3>Accessing Spreadsheet over the Web</h3>
|
287
305
|
<p>You can even read openoffice or excel-spreadsheets from a http-address:<br />
|
288
306
|
<pre><br />
|
@@ -340,7 +358,7 @@ h2. Feature Requests / Bugs</p>
|
|
340
358
|
<p><a href="http://roo.rubyforge.org/wiki/wiki.pl">http://roo.rubyforge.org/wiki/wiki.pl</a></p>
|
341
359
|
<h2>How to submit patches</h2>
|
342
360
|
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
343
|
-
<p><strike>The trunk repository is <code>svn://rubyforge.org/var/svn/
|
361
|
+
<p><strike>The trunk repository is <code>svn://rubyforge.org/var/svn/roo/trunk</code> for anonymous access.</strike></p>
|
344
362
|
<h2>License</h2>
|
345
363
|
<p>This code is free to use under the terms of Ruby</p>
|
346
364
|
<h2>Contact</h2>
|
@@ -351,9 +369,10 @@ h2. Feature Requests / Bugs</p>
|
|
351
369
|
<li>for the Excel-part the <a href="http://rubyforge.org/projects/spreadsheet/">spreadsheet</a> gem is used. My functions are a convenient wrapper around the functions of this gem</li>
|
352
370
|
<li>Dirk Huth fürs Testen unter Windows</li>
|
353
371
|
<li>Thanks to davecahill for a bug-fix patch within the google part</li>
|
372
|
+
<li>Thanks to Ryan Waldron for a bug-fix patch in Google set_value</li>
|
354
373
|
</ul>
|
355
374
|
<p class="coda">
|
356
|
-
<a href="mailto:thopre@gmail.com">Thomas Preymesser</a>,
|
375
|
+
<a href="mailto:thopre@gmail.com">Thomas Preymesser</a>, 26th September 2008<br>
|
357
376
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
358
377
|
</p>
|
359
378
|
</div>
|
data/website/index.txt
CHANGED
@@ -29,6 +29,12 @@ z. B. "Firma ABC GmbH" oder anonym, dann teile mir dies bitte mit!
|
|
29
29
|
|
30
30
|
h3. Spender
|
31
31
|
|
32
|
+
h4. Juli-September 2008
|
33
|
+
|
34
|
+
table.
|
35
|
+
|Betrag|Name|
|
36
|
+
|-|-|
|
37
|
+
|
32
38
|
h4. April-Juni 2008
|
33
39
|
|
34
40
|
table.
|
@@ -147,7 +153,7 @@ value of this formula. The formula itself can be retrieved with the #formula
|
|
147
153
|
method.
|
148
154
|
|
149
155
|
Time values are returned as type :time - the value of the cell are the seconds
|
150
|
-
from midnight
|
156
|
+
from midnight as a Fixnum object
|
151
157
|
|
152
158
|
h3. Write access
|
153
159
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Preymesser
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-27 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -60,7 +60,7 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.
|
63
|
+
version: 1.8.2
|
64
64
|
version:
|
65
65
|
description: roo can access the contents of OpenOffice-, Excel- or Google-Spreadsheets
|
66
66
|
email: thopre@gmail.com
|
@@ -136,6 +136,8 @@ files:
|
|
136
136
|
- test/bug-row-column-fixnum-float.xls
|
137
137
|
- test/emptysheets.ods
|
138
138
|
- test/emptysheets.xls
|
139
|
+
- test/datetime.ods
|
140
|
+
- test/datetime.xls
|
139
141
|
- website/index.html
|
140
142
|
- website/index.txt
|
141
143
|
- website/javascripts/rounded_corners_lite.inc.js
|
@@ -164,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
166
|
requirements: []
|
165
167
|
|
166
168
|
rubyforge_project: roo
|
167
|
-
rubygems_version: 1.
|
169
|
+
rubygems_version: 1.3.1
|
168
170
|
signing_key:
|
169
171
|
specification_version: 2
|
170
172
|
summary: roo can access the contents of OpenOffice-, Excel- or Google-Spreadsheets
|