pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/vip Initial import of vip, a script which let...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a20fa8ccf57d
branches:  trunk
changeset: 478000:a20fa8ccf57d
user:      agc <agc%pkgsrc.org@localhost>
date:      Wed Jul 14 11:41:52 2004 +0000

description:
Initial import of vip, a script which lets you edit data (via $EDITOR
or $VISUAL) at any point in a pipe. From a nudge from David Maxwell.

        Normally, in a pipeline, when you need to edit some phase of the data
        stream, you use a standard tool such as sed, grep, or awk to alter,
        filter, or otherwise manipulate the stream. One potential problem with
        this approach is that the manipulations have to be very well thought out
        in advance. Another is that the manipulations will probably need to be
        applied uniformly. And third, the data must be very well understood in
        advance. Not all situations and data easily conform to these
        constraints.

        Alternatively, when the changes needed for the data are more than
        trivial, or perhaps you just don't feel like expending the mental energy
        needed to work out all the expressions in advance, a typical approach
        might be to run some process or pipeline, dump output to a file, edit
        the file with vi, pico, or emacs, then push the data along to the next
        phase by using the file as input to some additional process or pipeline.
        The catch here - other than the sheer awkwardness of this process - is
        that you have to remember to come back later and clean up all of those
        little and not-so-little "temporary" files.

        So, wouldn't you just like to be able to tap in an edit session at any
        arbitrary point in the pipeline, do your magic on the data, then have it
        automagically continue on its merry way? The vip program provides this
        functionality, and operates syntactically just like any other filter.

diffstat:

 sysutils/vip/DESCR    |  23 +++++++++++++++++++++++
 sysutils/vip/Makefile |  31 +++++++++++++++++++++++++++++++
 sysutils/vip/PLIST    |   3 +++
 sysutils/vip/distinfo |   6 ++++++
 4 files changed, 63 insertions(+), 0 deletions(-)

diffs (79 lines):

diff -r ea4201b570fc -r a20fa8ccf57d sysutils/vip/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/vip/DESCR        Wed Jul 14 11:41:52 2004 +0000
@@ -0,0 +1,23 @@
+Normally, in a pipeline, when you need to edit some phase of the data
+stream, you use a standard tool such as sed, grep, or awk to alter,
+filter, or otherwise manipulate the stream. One potential problem with
+this approach is that the manipulations have to be very well thought out
+in advance. Another is that the manipulations will probably need to be
+applied uniformly. And third, the data must be very well understood in
+advance. Not all situations and data easily conform to these
+constraints.
+
+Alternatively, when the changes needed for the data are more than
+trivial, or perhaps you just don't feel like expending the mental energy
+needed to work out all the expressions in advance, a typical approach
+might be to run some process or pipeline, dump output to a file, edit
+the file with vi, pico, or emacs, then push the data along to the next
+phase by using the file as input to some additional process or pipeline.
+The catch here - other than the sheer awkwardness of this process - is
+that you have to remember to come back later and clean up all of those
+little and not-so-little "temporary" files.
+
+So, wouldn't you just like to be able to tap in an edit session at any
+arbitrary point in the pipeline, do your magic on the data, then have it
+automagically continue on its merry way? The vip program provides this
+functionality, and operates syntactically just like any other filter.
diff -r ea4201b570fc -r a20fa8ccf57d sysutils/vip/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/vip/Makefile     Wed Jul 14 11:41:52 2004 +0000
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/07/14 11:41:52 agc Exp $
+
+DISTNAME=      vip-19971113
+CATEGORIES=    sysutils
+MASTER_SITES=  http://www.cs.duke.edu/~des/scripts/
+DISTFILES=     vip vip.man
+
+MAINTAINER=    tech-pkg%NetBSD.org@localhost
+HOMEPAGE=      http://www.cs.duke.edu/~des/vip.html
+COMMENT=       Script to edit the data at any point in a pipeline
+
+PKG_INSTALLATION_TYPES=        overwrite pkgviews
+
+DIST_SUBDIR=   ${PKGNAME_NOREV}
+
+WRKSRC=                ${WRKDIR}
+NO_BUILDLINK=  # defined
+NO_CONFIGURE=  # defined
+NO_BUILD=      # defined
+
+INSTALLATION_DIRS=     bin man/man8
+
+do-extract:
+       ${CP} ${DISTDIR}/${DIST_SUBDIR}/vip ${WRKSRC}
+       ${CP} ${DISTDIR}/${DIST_SUBDIR}/vip.man ${WRKSRC}
+
+do-install:
+       ${INSTALL_SCRIPT} ${WRKSRC}/vip ${PREFIX}/bin
+       ${INSTALL_MAN} ${WRKSRC}/vip.man ${PREFIX}/man/man8/vip.8
+
+.include "../../mk/bsd.pkg.mk"
diff -r ea4201b570fc -r a20fa8ccf57d sysutils/vip/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/vip/PLIST        Wed Jul 14 11:41:52 2004 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/07/14 11:41:52 agc Exp $
+bin/vip
+man/man8/vip.8
diff -r ea4201b570fc -r a20fa8ccf57d sysutils/vip/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/vip/distinfo     Wed Jul 14 11:41:52 2004 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/07/14 11:41:52 agc Exp $
+
+SHA1 (vip-19971113/vip) = 0b2794b5ac2792af5fcf1d97f9aae04798eac049
+Size (vip-19971113/vip) = 4752 bytes
+SHA1 (vip-19971113/vip.man) = d52ce874d594ca2c82538200706bffdf1313fdc1
+Size (vip-19971113/vip.man) = 2411 bytes



Home | Main Index | Thread Index | Old Index