aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2021-11-05 13:50:35 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2021-11-07 23:33:53 +0000
commit8bf827588b7b124849f47347e2f9034f427ad91f (patch)
treeb34390dc9f07b1b03b4a4fb4918278ca9659eb02
parent2af447c8bac175a02de64aad1e36ad849df2f57f (diff)
textproc/gron.awk: New port
gron.awk transforms JSON into discrete assignments to make it easier to grep for fields and to see absolute paths of those. It is reasonably fast with Gawk/Mawk/GoAWK even on large-ish files. Slow with BWK on big JSON files (100K+). WWW: https://github.com/xonixx/gron.awk
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/gron.awk/Makefile23
-rw-r--r--textproc/gron.awk/distinfo3
-rw-r--r--textproc/gron.awk/pkg-descr9
4 files changed, 36 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index 07fc5eba7f36..511588d8fdb6 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -244,6 +244,7 @@
SUBDIR += greple
SUBDIR += groff
SUBDIR += gron
+ SUBDIR += gron.awk
SUBDIR += groonga
SUBDIR += gsed
SUBDIR += gspell
diff --git a/textproc/gron.awk/Makefile b/textproc/gron.awk/Makefile
new file mode 100644
index 000000000000..1013f3dfb6d3
--- /dev/null
+++ b/textproc/gron.awk/Makefile
@@ -0,0 +1,23 @@
+PORTNAME= gron.awk
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.0.1
+CATEGORIES= textproc
+
+MAINTAINER= 0mp@FreeBSD.org
+COMMENT= AWK implementation of gron, a JSON-to-greppable-text transformer
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USE_GITHUB= yes
+GH_ACCOUNT= xonixx
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+PLIST_FILES= bin/${PORTNAME}
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}/${PREFIX}/bin/
+
+.include <bsd.port.mk>
diff --git a/textproc/gron.awk/distinfo b/textproc/gron.awk/distinfo
new file mode 100644
index 000000000000..c403c2f44c74
--- /dev/null
+++ b/textproc/gron.awk/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1636119044
+SHA256 (xonixx-gron.awk-v0.0.1_GH0.tar.gz) = 4b1b9d02192d1543d0b3d9054587c7c5cb8ca2efef0beb7a5953f8294ec4a022
+SIZE (xonixx-gron.awk-v0.0.1_GH0.tar.gz) = 218664
diff --git a/textproc/gron.awk/pkg-descr b/textproc/gron.awk/pkg-descr
new file mode 100644
index 000000000000..c58fb554ad85
--- /dev/null
+++ b/textproc/gron.awk/pkg-descr
@@ -0,0 +1,9 @@
+Make JSON greppable!
+
+gron.awk transforms JSON into discrete assignments to make it easier to grep
+for fields and to see absolute paths of those.
+
+It is reasonably fast with Gawk/Mawk/GoAWK even on large-ish files. Slow with
+BWK on big JSON files (100K+).
+
+WWW: https://github.com/xonixx/gron.awk