Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamdecaf/csvq
CLI tool to parse and transform CSV files
https://github.com/adamdecaf/csvq
cli csv csv-converter csv-files csv-transformer jq
Last synced: 2 months ago
JSON representation
CLI tool to parse and transform CSV files
- Host: GitHub
- URL: https://github.com/adamdecaf/csvq
- Owner: adamdecaf
- License: apache-2.0
- Created: 2022-10-27T20:25:31.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-04T14:00:44.000Z (4 months ago)
- Last Synced: 2024-10-14T12:45:39.120Z (3 months ago)
- Topics: cli, csv, csv-converter, csv-files, csv-transformer, jq
- Language: Go
- Homepage: https://ashannon.us/csvq/
- Size: 1.57 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# csvq
[![GoDoc](https://godoc.org/github.com/adamdecaf/csvq?status.svg)](https://godoc.org/github.com/adamdecaf/csvq)
[![Build Status](https://github.com/adamdecaf/csvq/workflows/Go/badge.svg)](https://github.com/adamdecaf/csvq/actions)
[![Coverage Status](https://codecov.io/gh/adamdecaf/csvq/branch/master/graph/badge.svg)](https://codecov.io/gh/adamdecaf/csvq)
[![Go Report Card](https://goreportcard.com/badge/github.com/adamdecaf/csvq)](https://goreportcard.com/report/github.com/adamdecaf/csvq)
[![Apache 2 License](https://img.shields.io/badge/license-Apache2-blue.svg)](https://raw.githubusercontent.com/adamdecaf/csvq/master/LICENSE)csvq is a CLI package for parsing and transforming CSV files. This is useful because often trimming down a CSV file can make processing it easier.
## Install
Download the [latest release for your architecture](https://github.com/adamdecaf/csvq/releases/latest).
## Usage
Extract first_name and last_name columns (in that order). Sort results.
```
csvq -keep first_name,last_name ~/Downloads/report.csv | sort -u
```Change delimiter used in `report.csv`.
```
csvq -d';' user_id,dob,email ~/Downloads/report.csv
```Output CSV columns in a table.
```
csvq -keep first_name,last_name -format table
```Combine multiple files.
```
csvq -keep user_id,email ~/Downloads/report1.csv ~/Downloads/report2.csv
```## Supported and tested platforms
- 64-bit Linux (Ubuntu, Debian), macOS, and Windows
## License
Apache License 2.0 - See [LICENSE](LICENSE) for details.