2a69a22910
gron transforms JSON into discrete assignments to make it easier to grep for what you want and see the absolute 'path' to it. It eases the exploration of APIs that return large blobs of JSON but have terrible documentation. $ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | \ fgrep "commit.author" | grep -v email json[0].commit.author = {}; json[0].commit.author.date = "2016-07-02T10:51:21Z"; json[0].commit.author.name = "Tom Hudson"; gron can work backwards too, enabling you to turn your filtered data back into JSON (gron --ungron).
28 lines
565 B
Makefile
28 lines
565 B
Makefile
# $OpenBSD: Makefile,v 1.1.1.1 2021/03/15 11:12:16 sthen Exp $
|
|
|
|
COMMENT = make JSON greppable
|
|
|
|
MODGO_MODNAME = github.com/tomnomnom/gron
|
|
MODGO_VERSION = v0.6.1
|
|
|
|
DISTNAME = gron-${MODGO_VERSION}
|
|
PKGNAME = gron-0.6.1
|
|
|
|
CATEGORIES = textproc
|
|
|
|
# MIT
|
|
PERMIT_PACKAGE = Yes
|
|
|
|
WANTLIB += c pthread
|
|
|
|
MODULES = lang/go
|
|
|
|
MODGO_MODULES = \
|
|
github.com/fatih/color v1.7.0 \
|
|
github.com/mattn/go-colorable v0.0.9 \
|
|
github.com/mattn/go-isatty v0.0.4 \
|
|
github.com/nwidger/jsoncolor v0.0.0-20170215171346-75a6de4340e5 \
|
|
github.com/pkg/errors v0.8.0
|
|
|
|
.include <bsd.port.mk>
|