git: 37f2a178de57 - main - textproc/choose: add port: Human-friendly and fast alternative to cut and (sometimes) awk
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Feb 2023 11:33:51 UTC
The branch main has been updated by tagattie: URL: https://cgit.FreeBSD.org/ports/commit/?id=37f2a178de579edbe85eac9212e91881f134b6d2 commit 37f2a178de579edbe85eac9212e91881f134b6d2 Author: Hiroki Tagato <tagattie@FreeBSD.org> AuthorDate: 2023-02-27 11:32:07 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2023-02-27 11:33:39 +0000 textproc/choose: add port: Human-friendly and fast alternative to cut and (sometimes) awk This is choose, a human-friendly and fast alternative to cut and (sometimes) awk. Features - terse field selection syntax similar to Python's list slices - negative indexing from end of line - optional start/end index - zero-indexed - reverse ranges - aslightly faster than cut for sufficiently long inputs, much faster than awk - regular expression field separators using Rust's regex syntax WWW: https://github.com/theryangeary/choose --- textproc/Makefile | 1 + textproc/choose/Makefile | 31 +++++++++++++++++++ textproc/choose/Makefile.crates | 32 ++++++++++++++++++++ textproc/choose/distinfo | 67 +++++++++++++++++++++++++++++++++++++++++ textproc/choose/pkg-descr | 12 ++++++++ 5 files changed, 143 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index 4da768f5eb2f..3b0a5f1a759f 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -95,6 +95,7 @@ SUBDIR += cg3 SUBDIR += cgrep SUBDIR += chkascii + SUBDIR += choose SUBDIR += chpp SUBDIR += cl-meta SUBDIR += cl-meta-sbcl diff --git a/textproc/choose/Makefile b/textproc/choose/Makefile new file mode 100644 index 000000000000..7dbab66f16b2 --- /dev/null +++ b/textproc/choose/Makefile @@ -0,0 +1,31 @@ +PORTNAME= choose +DISTVERSIONPREFIX= v +DISTVERSION= 1.3.4 +CATEGORIES= textproc + +MAINTAINER= tagattie@FreeBSD.org +COMMENT= Human-friendly and fast alternative to cut and (sometimes) awk +WWW= https://github.com/theryangeary/choose + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= cargo + +USE_GITHUB= yes +GH_ACCOUNT= theryangeary + +PLIST_FILES= bin/${PORTNAME} + +PORTDOCS= contributing.md readme.md + +OPTIONS_DEFINE= DOCS + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.mk> diff --git a/textproc/choose/Makefile.crates b/textproc/choose/Makefile.crates new file mode 100644 index 000000000000..77d066f34a82 --- /dev/null +++ b/textproc/choose/Makefile.crates @@ -0,0 +1,32 @@ +CARGO_CRATES= aho-corasick-0.7.13 \ + ansi_term-0.11.0 \ + atty-0.2.14 \ + backslash-0.1.0 \ + bitflags-1.2.1 \ + clap-2.33.1 \ + heck-0.3.1 \ + hermit-abi-0.1.14 \ + lazy_static-1.4.0 \ + libc-0.2.71 \ + memchr-2.3.3 \ + proc-macro-error-1.0.3 \ + proc-macro-error-attr-1.0.3 \ + proc-macro2-1.0.18 \ + quote-1.0.7 \ + regex-1.3.9 \ + regex-syntax-0.6.18 \ + strsim-0.8.0 \ + structopt-0.3.15 \ + structopt-derive-0.4.8 \ + syn-1.0.33 \ + syn-mid-0.5.0 \ + textwrap-0.11.0 \ + thread_local-1.0.1 \ + unicode-segmentation-1.6.0 \ + unicode-width-0.1.7 \ + unicode-xid-0.2.1 \ + vec_map-0.8.2 \ + version_check-0.9.2 \ + winapi-0.3.9 \ + winapi-i686-pc-windows-gnu-0.4.0 \ + winapi-x86_64-pc-windows-gnu-0.4.0 diff --git a/textproc/choose/distinfo b/textproc/choose/distinfo new file mode 100644 index 000000000000..6ab3a63b023c --- /dev/null +++ b/textproc/choose/distinfo @@ -0,0 +1,67 @@ +TIMESTAMP = 1677496203 +SHA256 (rust/crates/aho-corasick-0.7.13.crate) = 043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86 +SIZE (rust/crates/aho-corasick-0.7.13.crate) = 111381 +SHA256 (rust/crates/ansi_term-0.11.0.crate) = ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b +SIZE (rust/crates/ansi_term-0.11.0.crate) = 17087 +SHA256 (rust/crates/atty-0.2.14.crate) = d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8 +SIZE (rust/crates/atty-0.2.14.crate) = 5470 +SHA256 (rust/crates/backslash-0.1.0.crate) = 35a89ea09f2c7f3c81711c0db7d389d86a9d66fa15a7067e6fd6dbef863ef786 +SIZE (rust/crates/backslash-0.1.0.crate) = 1882 +SHA256 (rust/crates/bitflags-1.2.1.crate) = cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693 +SIZE (rust/crates/bitflags-1.2.1.crate) = 16745 +SHA256 (rust/crates/clap-2.33.1.crate) = bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129 +SIZE (rust/crates/clap-2.33.1.crate) = 201567 +SHA256 (rust/crates/heck-0.3.1.crate) = 20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205 +SIZE (rust/crates/heck-0.3.1.crate) = 54666 +SHA256 (rust/crates/hermit-abi-0.1.14.crate) = b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909 +SIZE (rust/crates/hermit-abi-0.1.14.crate) = 9556 +SHA256 (rust/crates/lazy_static-1.4.0.crate) = e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646 +SIZE (rust/crates/lazy_static-1.4.0.crate) = 10443 +SHA256 (rust/crates/libc-0.2.71.crate) = 9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49 +SIZE (rust/crates/libc-0.2.71.crate) = 474209 +SHA256 (rust/crates/memchr-2.3.3.crate) = 3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400 +SIZE (rust/crates/memchr-2.3.3.crate) = 22566 +SHA256 (rust/crates/proc-macro-error-1.0.3.crate) = fc175e9777c3116627248584e8f8b3e2987405cabe1c0adf7d1dd28f09dc7880 +SIZE (rust/crates/proc-macro-error-1.0.3.crate) = 23736 +SHA256 (rust/crates/proc-macro-error-attr-1.0.3.crate) = 3cc9795ca17eb581285ec44936da7fc2335a3f34f2ddd13118b6f4d515435c50 +SIZE (rust/crates/proc-macro-error-attr-1.0.3.crate) = 6963 +SHA256 (rust/crates/proc-macro2-1.0.18.crate) = beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa +SIZE (rust/crates/proc-macro2-1.0.18.crate) = 36252 +SHA256 (rust/crates/quote-1.0.7.crate) = aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37 +SIZE (rust/crates/quote-1.0.7.crate) = 25170 +SHA256 (rust/crates/regex-1.3.9.crate) = 9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6 +SIZE (rust/crates/regex-1.3.9.crate) = 236683 +SHA256 (rust/crates/regex-syntax-0.6.18.crate) = 26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8 +SIZE (rust/crates/regex-syntax-0.6.18.crate) = 294440 +SHA256 (rust/crates/strsim-0.8.0.crate) = 8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a +SIZE (rust/crates/strsim-0.8.0.crate) = 9309 +SHA256 (rust/crates/structopt-0.3.15.crate) = de2f5e239ee807089b62adce73e48c625e0ed80df02c7ab3f068f5db5281065c +SIZE (rust/crates/structopt-0.3.15.crate) = 49378 +SHA256 (rust/crates/structopt-derive-0.4.8.crate) = 510413f9de616762a4fbeab62509bf15c729603b72d7cd71280fbca431b1c118 +SIZE (rust/crates/structopt-derive-0.4.8.crate) = 19647 +SHA256 (rust/crates/syn-1.0.33.crate) = e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd +SIZE (rust/crates/syn-1.0.33.crate) = 204845 +SHA256 (rust/crates/syn-mid-0.5.0.crate) = 7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a +SIZE (rust/crates/syn-mid-0.5.0.crate) = 14149 +SHA256 (rust/crates/textwrap-0.11.0.crate) = d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060 +SIZE (rust/crates/textwrap-0.11.0.crate) = 17322 +SHA256 (rust/crates/thread_local-1.0.1.crate) = d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14 +SIZE (rust/crates/thread_local-1.0.1.crate) = 12609 +SHA256 (rust/crates/unicode-segmentation-1.6.0.crate) = e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0 +SIZE (rust/crates/unicode-segmentation-1.6.0.crate) = 90703 +SHA256 (rust/crates/unicode-width-0.1.7.crate) = caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479 +SIZE (rust/crates/unicode-width-0.1.7.crate) = 16644 +SHA256 (rust/crates/unicode-xid-0.2.1.crate) = f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564 +SIZE (rust/crates/unicode-xid-0.2.1.crate) = 14392 +SHA256 (rust/crates/vec_map-0.8.2.crate) = f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191 +SIZE (rust/crates/vec_map-0.8.2.crate) = 14466 +SHA256 (rust/crates/version_check-0.9.2.crate) = b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed +SIZE (rust/crates/version_check-0.9.2.crate) = 11979 +SHA256 (rust/crates/winapi-0.3.9.crate) = 5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419 +SIZE (rust/crates/winapi-0.3.9.crate) = 1200382 +SHA256 (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6 +SIZE (rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = 2918815 +SHA256 (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f +SIZE (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 2947998 +SHA256 (theryangeary-choose-v1.3.4_GH0.tar.gz) = 6c711901bb094a1241a2cd11951d5b7c96f337971f8d2eeff33f38dfa6ffb6ed +SIZE (theryangeary-choose-v1.3.4_GH0.tar.gz) = 31055 diff --git a/textproc/choose/pkg-descr b/textproc/choose/pkg-descr new file mode 100644 index 000000000000..38daf8eecd20 --- /dev/null +++ b/textproc/choose/pkg-descr @@ -0,0 +1,12 @@ +This is choose, a human-friendly and fast alternative to cut and +(sometimes) awk. + +Features +- terse field selection syntax similar to Python's list slices +- negative indexing from end of line +- optional start/end index +- zero-indexed +- reverse ranges +- aslightly faster than cut for sufficiently long inputs, much faster + than awk +- regular expression field separators using Rust's regex syntax