Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 28 lines (20 sloc) 0.603 kB
a19d729 README OF BAMFITUDE!
Jon Distad and Alex Redington authored
1 BAMFCSV -- Parsin' CSVs like a BAMF!
2
3 $ gem install bamfcsv
4 $ irb -rbamfcsv
ce4f22e @jondistad Update README and Gemfile.lock
jondistad authored
5 irb> BAMFCSV.read "super_giant.csv"
6 ===> ...large array of arrays...
a19d729 README OF BAMFITUDE!
Jon Distad and Alex Redington authored
7
8 BAMF!!! CSV IS PARSED IN LESS THAN ONE SECOND! GUARANTEED!*
9
ce4f22e @jondistad Update README and Gemfile.lock
jondistad authored
10 also:
11 BAMFCSV.parse "csv,string,of,awesome"
a19d729 README OF BAMFITUDE!
Jon Distad and Alex Redington authored
12
ce4f22e @jondistad Update README and Gemfile.lock
jondistad authored
13 AND! both #parse and #read take an optional :headers => true to generate a table!
a19d729 README OF BAMFITUDE!
Jon Distad and Alex Redington authored
14
ce4f22e @jondistad Update README and Gemfile.lock
jondistad authored
15 irb(1.9.2): table = BAMFCSV.parse <<EOF, headers: true
16 ?> foo,bar
17 ?> 1,2
18 ?> 3,4
19 ?> EOF
20 ==========> #<BAMFCSV::Table>
21 irb(1.9.2): table.first["foo"]
22 ==========> "1"
23 irb(1.9.2): table[1]["bar"]
24 ==========> "4"
a19d729 README OF BAMFITUDE!
Jon Distad and Alex Redington authored
25
ce4f22e @jondistad Update README and Gemfile.lock
jondistad authored
26
27 (*) Results may vary.
Something went wrong with that request. Please try again.