{"id":26953174,"url":"https://github.com/smartlyio/cswat","last_synced_at":"2025-04-03T01:20:02.852Z","repository":{"id":52371048,"uuid":"66074681","full_name":"smartlyio/cswat","owner":"smartlyio","description":"When you have to deal with CSV that makes you go wat.","archived":false,"fork":false,"pushed_at":"2024-04-09T06:52:35.000Z","size":105,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":109,"default_branch":"master","last_synced_at":"2024-04-14T06:24:35.727Z","etag":null,"topics":["csv"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smartlyio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-08-19T10:31:29.000Z","updated_at":"2023-03-20T12:01:51.000Z","dependencies_parsed_at":"2023-12-15T15:43:09.401Z","dependency_job_id":null,"html_url":"https://github.com/smartlyio/cswat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlyio%2Fcswat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlyio%2Fcswat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlyio%2Fcswat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlyio%2Fcswat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smartlyio","download_url":"https://codeload.github.com/smartlyio/cswat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246917385,"owners_count":20854631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv"],"created_at":"2025-04-03T01:20:02.141Z","updated_at":"2025-04-03T01:20:02.836Z","avatar_url":"https://github.com/smartlyio.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSWat\n\nFor when you have to parse streaming CSV that doesn't make any sense whatsoever.\n\nThis is basically a gemified version of [Ruby CSV parser][stdlibcsv] with some\nminor modifications to support more non-standard variants, so all the kudos goes\nto [James Edward Gray II][jeg2].\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'cswat'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install cswat\n\n## Usage\n\n`CSWat` is basically a fork of Ruby masters branch CSV library, renamed to\n`CSWat` to avoid clashes. Use is as you would use `CSV`, with addition to a few\nadded options to relax some csv restrictions around the standards. For now there\nare a few new options:\n\n+ `nonstandard_quote` which is a boolean value determinig if it should try to\n  handle non-standard quoting style of PHP standard library csv implementation.\n  Look at the [tests] for more information.\n+ `graceful_errors` which overrides default behaviour of raising MalformedCSV\n  exceptions and instead returns them as rows.\n+ `accept_backslash_escape` which causes the parser to accept escaping of quote\n  character with a backslash (e.g. `\\\"`) the same as standard double-quote\n  escaping (e.g. `\"\"`).\n+ `liberal_parsing` which accepts partially quoted column values, e.g. see\n  [liberal parsing test] for concrete examples.\n\nAdditionally CSWat provides a niftly small executable (`cswat`, obviously) which\nreads from `ARGF` and prints each row it parsed with `p` so you can see how\nCSWat sees your local file.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run\n`rake spec` to run the tests. You can also run `bin/console` for an interactive\nprompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To\nrelease a new version, update the version number in `version.rb`, and then run\n`bundle exec rake release`, which will create a git tag for the version, push\ngit commits and tags, and push the `.gem` file to [rubygems.org].\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/smartlyio/cswat. This project is intended to be a safe,\nwelcoming space for collaboration, and contributors are expected to adhere to\nthe [Contributor Covenant] code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License].\n\n[rubygems.org]: https://rubygems.org\n[MIT License]: http://opensource.org/licenses/MIT\n[Contributor Covenant]: http://contributor-covenant.org\n[stdlibcsv]: https://github.com/ruby/ruby/blob/trunk/lib/csv.rb\n[jeg2]: https://twitter.com/jeg2\n[tests]: https://github.com/smartlyio/cswat/blob/master/test/test_features.rb\n[liberal parsing test]: https://github.com/smartlyio/cswat/blob/master/test/test_features.rb#L127\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlyio%2Fcswat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartlyio%2Fcswat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlyio%2Fcswat/lists"}