diff --git a/misc/txt2regex/README b/misc/txt2regex/README new file mode 100644 index 0000000000..5b3de4d342 --- /dev/null +++ b/misc/txt2regex/README @@ -0,0 +1,12 @@ +txt2regex (interactive regular expression trainer) + +Txt2regex is a regular expression wizard for the command line. + +Users with little or no knowledge of regular expressions can quickly +create hairy regexes by answering questions in a simple text-based +interactive interface. + +Txt2regex is aware of the particular notation and caveats of many +different regular expression flavors, generating valid regexes for +more than 20 targets, including grep, sed, Vim, Emacs, JavaScript, +Python, PHP, PostgreSQL. diff --git a/misc/txt2regex/slack-desc b/misc/txt2regex/slack-desc new file mode 100644 index 0000000000..0bef91698c --- /dev/null +++ b/misc/txt2regex/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +txt2regex: txt2regex (interactive regular expression trainer) +txt2regex: +txt2regex: Txt2regex is a regular expression wizard for the command line. +txt2regex: +txt2regex: Users with little or no knowledge of regular expressions can quickly +txt2regex: create hairy regexes by answering questions in a simple text-based +txt2regex: interactive interface. +txt2regex: +txt2regex: +txt2regex: +txt2regex: diff --git a/misc/txt2regex/txt2regex.SlackBuild b/misc/txt2regex/txt2regex.SlackBuild new file mode 100644 index 0000000000..4592cda5b4 --- /dev/null +++ b/misc/txt2regex/txt2regex.SlackBuild @@ -0,0 +1,49 @@ +#!/bin/sh + +# Slackware build script for txt2regex + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=txt2regex +VERSION=${VERSION:-0.9} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +ARCH=noarch + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# There's a MANDIR in the Makefile, but nothing uses it. Have to +# install the man page, er, manually. + +make install DESTDIR=$PKG +mkdir -p $PKG/usr/man/man1 +gzip -9c < man/$PRGNAM.man > $PKG/usr/man/man1/$PRGNAM.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +chmod -x tests/regex-tester.sh # no +x files in the doc dir! +gzip -9 tests/regex-tester.txt # 116KB => 10KB +cp -a *.md COPYRIGHT TODO tests man/*.html $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/misc/txt2regex/txt2regex.info b/misc/txt2regex/txt2regex.info new file mode 100644 index 0000000000..ff487ac5a3 --- /dev/null +++ b/misc/txt2regex/txt2regex.info @@ -0,0 +1,10 @@ +PRGNAM="txt2regex" +VERSION="0.9" +HOMEPAGE="http://aurelio.net/projects/txt2regex/" +DOWNLOAD="https://github.com/aureliojargas/txt2regex/archive/v0.9/txt2regex-0.9.tar.gz" +MD5SUM="7066adc50e55300f5bcad276cf65b852" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com"