{"id":23543219,"url":"https://github.com/inkel/csvq","last_synced_at":"2025-05-15T06:34:27.966Z","repository":{"id":57652447,"uuid":"103435355","full_name":"inkel/csvq","owner":"inkel","description":"Simple tool for querying CSV files","archived":false,"fork":false,"pushed_at":"2017-09-14T01:31:29.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T09:27:08.194Z","etag":null,"topics":["csv","go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/inkel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-13T18:21:11.000Z","updated_at":"2017-09-15T19:03:45.000Z","dependencies_parsed_at":"2022-08-25T15:22:01.621Z","dependency_job_id":null,"html_url":"https://github.com/inkel/csvq","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/inkel%2Fcsvq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkel%2Fcsvq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkel%2Fcsvq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inkel%2Fcsvq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inkel","download_url":"https://codeload.github.com/inkel/csvq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254288319,"owners_count":22045880,"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","go","golang"],"created_at":"2024-12-26T06:19:01.427Z","updated_at":"2025-05-15T06:34:27.948Z","avatar_url":"https://github.com/inkel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `csvq` - Simple tool for querying CSV files\n\nI love [`jq`](https://stedolan.github.io/jq/) and I wanted to do something similar for CSV data. So here it is.\n\n**I AM GOING TO REWRITE MUCH OF THIS SO DON'T RELY ON IT FOR NOW**\n\n## Installation\nInstall the latest version:\n\n```\ngo install -u github.com/inkel/csvq\n```\n\n## Usage\n```\nUsage of csvq:\n  -H\tFirst line are headers (default true)\n  -h string\n    \tColumn to filter\n  -v string\n    \tValue\n```\n\nUsing the example data in [`encoding/csv`](https://golang.org/pkg/encoding/csv/) package documentation:\n\n```\nfirst_name,last_name,username\n\"Rob\",\"Pike\",rob\nKen,Thompson,ken\n\"Robert\",\"Griesemer\",\"gri\"\n``` \n\n### Do nothing\n```\n$ csvq file.csv\nfirst_name,last_name,username\nRob,Pike,rob\nKen,Thompson,ken\nRobert,Griesemer,gri\n```\n\n### Filter by named column\n```\n$ csvq -h username -v ken file.csv\nfirst_name,last_name,username\nKen,Thompson,ken\n```\n\nOf course, if you pass `-H=false`, meaning the CSV file doesn't have headers, then this will fail with something like:\n\n```\n$ csvq -H=false -h first_name -v Rob gophers.csv\nstrconv.Atoi: parsing \"first_name\": invalid syntax\n```\n\n### Filter by column number\n```\n$ csvq -h 3 -v johndoe file.csv\nfirst_name,last_name,username\nKen,Thompson,ken\n```\n\nThis one works whether you enable headers or not.\n\n### Select columns to output\nTODO\n\n### Change columns order\nTODO\n\n### Change output delimiter\nTODO\n\n### Change to JSON\nTODO\n\n## License\nSee [LICENSE](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkel%2Fcsvq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finkel%2Fcsvq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkel%2Fcsvq/lists"}