Sha256: 53a8241840d48c286e3f08784c9dc80be1246c27ba8611e5bf4d489ab7a791ab

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

# CSV++

CSV++ takes a `<DELIMITER>` separated input file and a JSON format specification
and turns it into Ruby Objects. See `test/sample_inputs/simple.txt` and
`test/sample_formats/simple.json` for example.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'csvpp'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install csvpp

## Usage

```ruby
CSVPP.parse(
  input: 'test/sample_inputs/simple.txt',
  format: 'test/sample_formats/simple.json'
) # => [{"v1"=>34, "line_number"=>1, "v2"=>"foobar"}, {"v1"=>99, "line_number"=>2, "v2"=>"hi  there"}]
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run
`rake test` to run the tests. You can also run `bin/console` for an interactive
prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To
release a new version, update the version number in `version.rb`, and then run
`bundle exec rake release`, which will create a git tag for the version, push
git commits and tags, and push the `.gem` file to
[rubygems.org](https://rubygems.org).

## License

The gem is available as open source under the terms of the [MIT
License](https://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csvpp-0.3.0 README.md