seamusabshere-remote_table 0.1.3 → 0.1.4
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/README.rdoc +23 -14
- data/VERSION +1 -1
- data/remote_table.gemspec +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
==
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
=remote_table
|
|
2
|
+
|
|
3
|
+
Remotely open and parse Excel XLS, ODS, CSV and fixed-width tables.
|
|
4
|
+
|
|
5
|
+
==Real-life usage
|
|
6
|
+
|
|
7
|
+
Used by data_miner (http://github.com/seamusabshere/data_miner)
|
|
8
|
+
|
|
9
|
+
==Example
|
|
10
|
+
|
|
11
|
+
Taken from <tt>#{GEMDIR}/test/remote_table_test.rb</tt>:
|
|
12
|
+
|
|
13
|
+
>> t = RemoteTable.new(:url => 'http://www.fueleconomy.gov/FEG/epadata/98guide6.zip', :filename => '98guide6.csv')
|
|
14
|
+
=> #<RemoteTable:0x359da50 @transform=#<RemoteTable::Transform:0x359d154 @select=nil, @reject=nil>, @file=#<RemoteTable::File:0x35970c4 @delimiter=nil, @headers=nil, @cut=nil, @filename="98guide6.csv", @skip=nil, @schema_name=nil, @crop=nil, @format=:csv, @trap=nil, @sheet=0, @schema=nil>, @package=#<RemoteTable::Package:0x359c538 @url="http://www.fueleconomy.gov/FEG/epadata/98guide6.zip", @filename="98guide6.csv", @compression=:zip, @packing=nil>, @request=#<RemoteTable::Request:0x3596bec @url="http://www.fueleconomy.gov/FEG/epadata/98guide6.zip">>
|
|
15
|
+
>> t.rows.first
|
|
16
|
+
=> {"cyl"=>"6", "eng dscr"=>"DOHC VTEC", "trans dscr"=>"2MODE CLKUP", "trans"=>"Auto(L4)", "cmb"=>"20", "2pv"=>nil, "carline name"=>"NSX", "displ"=>"3.0", "ucmb"=>"23.5311", "hpv"=>nil, "4pv"=>nil, "Class"=>"TWO SEATERS", "Manufacturer"=>"ACURA", "fl"=>"P", "2lv"=>nil, "G"=>nil, "hlv"=>nil, "drv"=>"R", "cty"=>"18", "ucty"=>"19.8733", "S"=>nil, "4lv"=>nil, "fcost"=>"1050", "T"=>nil, "hwy"=>"24", "uhwy"=>"30.3612"}
|
|
17
|
+
|
|
18
|
+
See the test file and also data_miner examples of custom parsers.
|
|
19
|
+
|
|
20
|
+
==Authors
|
|
21
|
+
|
|
22
|
+
* Seamus Abshere <seamus@abshere.net>
|
|
23
|
+
* Andy Rossmeissl <andy@rossmeissl.net>
|
|
15
24
|
|
|
16
25
|
== Copyright
|
|
17
26
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.4
|
data/remote_table.gemspec
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{remote_table}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.4"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Seamus Abshere", "Andy Rossmeissl"]
|