From 905aa60e02ccc1dbc2428c045be117aa6fbdbdbe Mon Sep 17 00:00:00 2001 From: Ryan Steinmetz Date: Sat, 2 Mar 2019 00:30:44 +0000 Subject: [PATCH] New port: textproc/gron: Make JSON greppable! 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. WWW: https://github.com/tomnomnom/gron --- textproc/Makefile | 1 + textproc/gron/Makefile | 36 ++++++++++++++++++++++++++++++++++++ textproc/gron/distinfo | 13 +++++++++++++ textproc/gron/pkg-descr | 7 +++++++ 4 files changed, 57 insertions(+) create mode 100644 textproc/gron/Makefile create mode 100644 textproc/gron/distinfo create mode 100644 textproc/gron/pkg-descr diff --git a/textproc/Makefile b/textproc/Makefile index a8980c7e71f3..89c7752a6276 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -234,6 +234,7 @@ SUBDIR += grc-aspell SUBDIR += greple SUBDIR += groff + SUBDIR += gron SUBDIR += groonga SUBDIR += gsed SUBDIR += gspell diff --git a/textproc/gron/Makefile b/textproc/gron/Makefile new file mode 100644 index 000000000000..7decc83a10b7 --- /dev/null +++ b/textproc/gron/Makefile @@ -0,0 +1,36 @@ +# Created by: Ryan Steinmetz +# $FreeBSD$ + +PORTNAME= gron +PORTVERSION= 0.6.0 +DISTVERSIONPREFIX= v +CATEGORIES= textproc + +MAINTAINER= zi@FreeBSD.org +COMMENT= Transforms JSON into discrete assignments that are easier to grep + +LICENSE= MIT + +USES= go +USE_GITHUB= yes +GH_ACCOUNT= tomnomnom +GH_TUPLE= fatih:color:v1.7.0:color \ + mattn:go-colorable:v0.1.1:colorable \ + mattn:go-isatty:v0.0.6:isatty \ + nwidger:jsoncolor:75a6de4:jsoncolor \ + pkg:errors:v0.8.1:pkg_errors + +PLIST_FILES= bin/${PORTNAME} + +pre-build: + ${MKDIR} ${GO_WRKDIR_SRC}/github.com/fatih \ + ${GO_WRKDIR_SRC}/github.com/mattn \ + ${GO_WRKDIR_SRC}/github.com/pkg \ + ${GO_WRKDIR_SRC}/github.com/nwidger + ${MV} ${WRKSRC_color} ${GO_WRKDIR_SRC}/github.com/fatih/color + ${MV} ${WRKSRC_colorable} ${GO_WRKDIR_SRC}/github.com/mattn/go-colorable + ${MV} ${WRKSRC_isatty} ${GO_WRKDIR_SRC}/github.com/mattn/go-isatty + ${MV} ${WRKSRC_jsoncolor} ${GO_WRKDIR_SRC}/github.com/nwidger/jsoncolor + ${MV} ${WRKSRC_pkg_errors} ${GO_WRKDIR_SRC}/github.com/pkg/errors + +.include diff --git a/textproc/gron/distinfo b/textproc/gron/distinfo new file mode 100644 index 000000000000..3eef52667783 --- /dev/null +++ b/textproc/gron/distinfo @@ -0,0 +1,13 @@ +TIMESTAMP = 1551486455 +SHA256 (tomnomnom-gron-v0.6.0_GH0.tar.gz) = fe75b1b4922b591723f48cb9cd2c31cb60bb3ab9f8d0398df75a08b781d8591c +SIZE (tomnomnom-gron-v0.6.0_GH0.tar.gz) = 338182 +SHA256 (fatih-color-v1.7.0_GH0.tar.gz) = 4650d7aa3feed266fc85d91dc34ca9cffdf7ee03ea29bf2cbf84bbecc75fb755 +SIZE (fatih-color-v1.7.0_GH0.tar.gz) = 816449 +SHA256 (mattn-go-colorable-v0.1.1_GH0.tar.gz) = 41773345d2a1037a37942b96e04a8ed5248f19a8f43a7ba26aa16a7b74132647 +SIZE (mattn-go-colorable-v0.1.1_GH0.tar.gz) = 8518 +SHA256 (mattn-go-isatty-v0.0.6_GH0.tar.gz) = 798c24d6e9d74c46565fa5899a514e773d7b254ee7bf45aba700f1e84681e421 +SIZE (mattn-go-isatty-v0.0.6_GH0.tar.gz) = 3566 +SHA256 (nwidger-jsoncolor-75a6de4_GH0.tar.gz) = 53ee90557b48eecdbc4ac1b835f4d761a821b94f5ca9b7e65c3c01fe0eae242c +SIZE (nwidger-jsoncolor-75a6de4_GH0.tar.gz) = 4372 +SHA256 (pkg-errors-v0.8.1_GH0.tar.gz) = 7a428967c6fc2e80cd84a0d9469ab6bd4dbe6b13493ba6294322a933a5a7e356 +SIZE (pkg-errors-v0.8.1_GH0.tar.gz) = 11009 diff --git a/textproc/gron/pkg-descr b/textproc/gron/pkg-descr new file mode 100644 index 000000000000..52076a51fc6d --- /dev/null +++ b/textproc/gron/pkg-descr @@ -0,0 +1,7 @@ +Make JSON greppable! + +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. + +WWW: https://github.com/tomnomnom/gron