https://github.com/jiro4989/gsv
gsv transforms a multi-line CSV into one-line JSON to make it easier to grep.
https://github.com/jiro4989/gsv
cli csv go grep
Last synced: 11 months ago
JSON representation
gsv transforms a multi-line CSV into one-line JSON to make it easier to grep.
- Host: GitHub
- URL: https://github.com/jiro4989/gsv
- Owner: jiro4989
- License: mit
- Created: 2022-03-10T11:09:55.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-06T05:16:02.000Z (11 months ago)
- Last Synced: 2025-05-06T06:27:18.389Z (11 months ago)
- Topics: cli, csv, go, grep
- Language: Go
- Homepage:
- Size: 303 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= gsv
:sectnums:
:toc: left
image:https://github.com/jiro4989/gsv/actions/workflows/go-test.yml/badge.svg[test, link="https://github.com/jiro4989/gsv/actions/workflows/go-test.yml"]
image:https://codecov.io/gh/jiro4989/gsv/branch/main/graph/badge.svg[codecov, link="https://codecov.io/gh/jiro4989/gsv"]
`gsv` transforms a multi-line CSV into one-line JSON to make it easier to `grep`.
`gsv` is heavily inspired by https://github.com/tomnomnom/gron[gron].
[source,bash]
----
⟩ cat testdata/sample1.csv
Language,Word,Note
English,"Hello
World",note
Japanese,"こんにちは
こんばんは",メモ
English,"John
Rose",
Japanese,"太郎
花子",
⟩ cat testdata/sample1.csv | ./gsv
["Language","Word","Note"]
["English","Hello\nWorld","note"]
["Japanese","こんにちは\nこんばんは","メモ"]
["English","John\nRose",""]
["Japanese","太郎\n花子",""]
⟩ cat testdata/sample1.csv | ./gsv | grep Japan
["Japanese","こんにちは\nこんばんは","メモ"]
["Japanese","太郎\n花子",""]
⟩ cat testdata/sample1.csv | ./gsv | grep Japan | ./gsv -u
Japanese,"こんにちは
こんばんは",メモ
Japanese,"太郎
花子",
----
== Usage
[source,bash]
----
gsv | grep '' | gsv -u
----
== Installation
[source,bash]
----
go install github.com/jiro4989/gsv@main
----
or download executables from https://github.com/jiro4989/gsv/releases[GitHub Releases].