From cb98152597aa9bbdfb9afdc217877e95e54d9a78 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Mon, 20 Jan 2003 05:42:15 +0000 Subject: New port textproc/spellutils: newsbody & pospell spell-checking utilities. Spellutils is a suite of programs which are used to isolate some parts or texts from various types of files and hand them over to another program which may change the texts; it is typically a spell checker. Afterwards the possibly changed text parts are copied back in place in the original file. PR: ports/41211 Submitted by: Thierry Thomas --- textproc/spellutils/Makefile | 45 +++++++++++++++++++++++++++++++++++++ textproc/spellutils/distinfo | 1 + textproc/spellutils/files/aspell.sl | 32 ++++++++++++++++++++++++++ textproc/spellutils/pkg-comment | 1 + textproc/spellutils/pkg-descr | 20 +++++++++++++++++ textproc/spellutils/pkg-message | 5 +++++ textproc/spellutils/pkg-plist | 8 +++++++ 7 files changed, 112 insertions(+) create mode 100644 textproc/spellutils/Makefile create mode 100644 textproc/spellutils/distinfo create mode 100644 textproc/spellutils/files/aspell.sl create mode 100644 textproc/spellutils/pkg-comment create mode 100644 textproc/spellutils/pkg-descr create mode 100644 textproc/spellutils/pkg-message create mode 100644 textproc/spellutils/pkg-plist (limited to 'textproc/spellutils') diff --git a/textproc/spellutils/Makefile b/textproc/spellutils/Makefile new file mode 100644 index 000000000000..cf1c50f7a385 --- /dev/null +++ b/textproc/spellutils/Makefile @@ -0,0 +1,45 @@ +# New ports collection makefile for: spellutils +# Date created: Mar 30 jul 2002 22:42:49 CEST +# Whom: thierry@pompo.net +# +# $FreeBSD$ +# + +PORTNAME= spellutils +PORTVERSION= 0.7 +CATEGORIES= textproc +MASTER_SITES= http://home.worldonline.dk/byrial/spellutils/ + +MAINTAINER= thierry@pompo.net + +LIB_DEPENDS= intl.4:${PORTSDIR}/devel/gettext + +GNU_CONFIGURE= yes +USE_BZIP2= yes +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LIBS='-L${LOCALBASE}/lib' \ + LDFLAGS=-lintl + +MAN1= pospell.1 newsbody.1 + +DOCS= NEWS README +EXAMPLES= aspell.sl + +post-install: +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${MKDIR} ${EXAMPLESDIR} +.for FILE in ${DOCS} + @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} +.endfor + @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}." +.for FILE in ${EXAMPLES} + @${INSTALL_DATA} ${FILESDIR}/${FILE} ${EXAMPLESDIR} +.endfor + @${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}." +.endif + @${ECHO_MSG} + @${CAT} ${PKGMESSAGE} | ${SED} -e "s:%%PREFIX%%:${PREFIX}:g" + @${ECHO_MSG} + +.include diff --git a/textproc/spellutils/distinfo b/textproc/spellutils/distinfo new file mode 100644 index 000000000000..fe4851b4db50 --- /dev/null +++ b/textproc/spellutils/distinfo @@ -0,0 +1 @@ +MD5 (spellutils-0.7.tar.bz2) = e2f64d49aabb359e79ba588e6c14c3c2 diff --git a/textproc/spellutils/files/aspell.sl b/textproc/spellutils/files/aspell.sl new file mode 100644 index 000000000000..8eadf5659f7b --- /dev/null +++ b/textproc/spellutils/files/aspell.sl @@ -0,0 +1,32 @@ +% This macro demonstrates the use of the post_filter_hook +% In your .slrnrc, add the line `interpret "/usr/local/share/examples/spellutils/aspell.sl"' + +%static +define aspell_file (file) +{ + variable cmd = "/usr/local/bin/newsbody -qs -k Subject -n '%s' -p /usr/local/bin/aspell -- -c -x %%f"; + () = system (sprintf (cmd, file)); +} + + +define post_filter_hook (file) +{ + variable rsp; + variable cmd; + + forever + { + rsp = get_response ("NnAa", + "Select Filter? \001None, \001Aspell"); + + switch (rsp) + { + case 'a' or case 'A': + aspell_file (file); + } + { + case 'n' or case 'N': + return; + } + } +} diff --git a/textproc/spellutils/pkg-comment b/textproc/spellutils/pkg-comment new file mode 100644 index 000000000000..4b2f43ce324a --- /dev/null +++ b/textproc/spellutils/pkg-comment @@ -0,0 +1 @@ +Programs used to isolate some parts or texts before spell-checking diff --git a/textproc/spellutils/pkg-descr b/textproc/spellutils/pkg-descr new file mode 100644 index 000000000000..2b40c6845f62 --- /dev/null +++ b/textproc/spellutils/pkg-descr @@ -0,0 +1,20 @@ +Spellutils is a suite of programs which are used to isolate some parts +or texts from various types of files and hand them over to another +program which may change the texts; it is typically a spell checker. +Afterwards the possibly changed text parts are copied back in place in +the original file. + +1) The newsbody utility +The program newsbody is a utility to isolate the body part of a news or +email message in a separate file and then call some other program which +may change the body, and eventually merge the headers with the possibly +changed body. Optionally quotes and/or signature can be removed too, as +well as all or selected header lines can be kept. + +2) The pospell utility +The program pospell is a utility to isolate the translations from a .po +file, then call some other program which may change the translations +(typically a spell checker), and eventually copy them back in place in +the .po file. + +WWW: http://home.worldonline.dk/byrial/spellutils/ diff --git a/textproc/spellutils/pkg-message b/textproc/spellutils/pkg-message new file mode 100644 index 000000000000..e60477a95846 --- /dev/null +++ b/textproc/spellutils/pkg-message @@ -0,0 +1,5 @@ +***************************************************************************** + + newsbody & pospell have been installed in %%PREFIX%%/bin. + +***************************************************************************** diff --git a/textproc/spellutils/pkg-plist b/textproc/spellutils/pkg-plist new file mode 100644 index 000000000000..44fcd769438a --- /dev/null +++ b/textproc/spellutils/pkg-plist @@ -0,0 +1,8 @@ +bin/pospell +bin/newsbody +share/locale/da/LC_MESSAGES/spellutils.mo +%%PORTDOCS%%share/doc/spellutils/NEWS +%%PORTDOCS%%share/doc/spellutils/README +%%PORTDOCS%%share/examples/spellutils/aspell.sl +%%PORTDOCS%%@dirrm share/doc/spellutils +%%PORTDOCS%%@dirrm share/examples/spellutils -- cgit v1.2.3