Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 2002 22:55:55 +0200 (CEST)
From:      Thierry Thomas <thierry@pompo.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/41211: New port textproc/spellutils: newsbody & pospell spell-checking utilities.
Message-ID:  <20020731205555.904737627@graf.pompo.net>

next in thread | raw e-mail | index | archive | help

>Number:         41211
>Category:       ports
>Synopsis:       New port textproc/spellutils: newsbody & pospell spell-checking utilities.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 31 14:00:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 4.6-STABLE FreeBSD 4.6-STABLE #0: Sat Jul 27 17:13:53 CEST 2002 root@graf.pompo.net:/usr/obj/mntsrc/src/sys/GRAF020727 i386


	
>Description:
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. 

>How-To-Repeat:
	N/A.

>Fix:

	Execute the following shar file:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/textproc/spellutils
#	/usr/ports/textproc/spellutils/pkg-message
#	/usr/ports/textproc/spellutils/pkg-descr
#	/usr/ports/textproc/spellutils/distinfo
#	/usr/ports/textproc/spellutils/Makefile
#	/usr/ports/textproc/spellutils/pkg-plist
#	/usr/ports/textproc/spellutils/pkg-comment
#	/usr/ports/textproc/spellutils/files
#	/usr/ports/textproc/spellutils/files/aspell.sl
#
echo c - /usr/ports/textproc/spellutils
mkdir -p /usr/ports/textproc/spellutils > /dev/null 2>&1
echo x - /usr/ports/textproc/spellutils/pkg-message
sed 's/^X//' >/usr/ports/textproc/spellutils/pkg-message << 'END-of-/usr/ports/textproc/spellutils/pkg-message'
X*****************************************************************************
X
X newsbody & pospell have been installed in %%PREFIX%%/bin.
X
X*****************************************************************************
END-of-/usr/ports/textproc/spellutils/pkg-message
echo x - /usr/ports/textproc/spellutils/pkg-descr
sed 's/^X//' >/usr/ports/textproc/spellutils/pkg-descr << 'END-of-/usr/ports/textproc/spellutils/pkg-descr'
XSpellutils is a suite of programs which are used to isolate some parts
Xor texts from various types of files and hand them over to another
Xprogram which may change the texts; it is typically a spell checker.
XAfterwards the possibly changed text parts are copied back in place in
Xthe original file.
X
X1) The newsbody utility
XThe program newsbody is a utility to isolate the body part of a news or
Xemail message in a separate file and then call some other program which
Xmay change the body, and eventually merge the headers with the possibly
Xchanged body. Optionally quotes and/or signature can be removed too, as
Xwell as all or selected header lines can be kept.
X
X2) The pospell utility
XThe program pospell is a utility to isolate the translations from a .po
Xfile, then call some other program which may change the translations
X(typically a spell checker), and eventually copy them back in place in
Xthe .po file. 
X
XWWW: http://home.worldonline.dk/byrial/spellutils/
END-of-/usr/ports/textproc/spellutils/pkg-descr
echo x - /usr/ports/textproc/spellutils/distinfo
sed 's/^X//' >/usr/ports/textproc/spellutils/distinfo << 'END-of-/usr/ports/textproc/spellutils/distinfo'
XMD5 (spellutils-0.7.tar.bz2) = e2f64d49aabb359e79ba588e6c14c3c2
END-of-/usr/ports/textproc/spellutils/distinfo
echo x - /usr/ports/textproc/spellutils/Makefile
sed 's/^X//' >/usr/ports/textproc/spellutils/Makefile << 'END-of-/usr/ports/textproc/spellutils/Makefile'
X# New ports collection makefile for:	spellutils
X# Date created:		Mar 30 jul 2002 22:42:49 CEST
X# Whom:			thierry@pompo.net
X#
X# $FreeBSD$
X#
X
XPORTNAME=	spellutils
XPORTVERSION=	0.7
XCATEGORIES=	textproc
XMASTER_SITES=	http://home.worldonline.dk/byrial/spellutils/
X
XMAINTAINER=	thierry@pompo.net
X
XLIB_DEPENDS=	intl.2:${PORTSDIR}/devel/gettext
X
XGNU_CONFIGURE=	yes
XUSE_BZIP2=	yes
XCONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include"	\
X		LIBS='-L${LOCALBASE}/lib'		\
X		LDFLAGS=-lintl
X
XMAN1=		pospell.1 newsbody.1
X
XDOCS=		NEWS README
XEXAMPLES=	aspell.sl
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@${MKDIR} ${EXAMPLESDIR}
X.for FILE in ${DOCS}
X	@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
X.endfor
X	@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
X.for FILE in ${EXAMPLES}
X	@${INSTALL_DATA} ${FILESDIR}/${FILE} ${EXAMPLESDIR}
X.endfor
X	@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
X.endif
X	@${ECHO_MSG}
X	@${CAT} ${PKGMESSAGE} | ${SED} -e "s:%%PREFIX%%:${PREFIX}:g"
X	@${ECHO_MSG}
X
X.include <bsd.port.mk>
END-of-/usr/ports/textproc/spellutils/Makefile
echo x - /usr/ports/textproc/spellutils/pkg-plist
sed 's/^X//' >/usr/ports/textproc/spellutils/pkg-plist << 'END-of-/usr/ports/textproc/spellutils/pkg-plist'
Xbin/pospell
Xbin/newsbody
Xshare/locale/da/LC_MESSAGES/spellutils.mo
X%%PORTDOCS%%share/doc/spellutils/NEWS
X%%PORTDOCS%%share/doc/spellutils/README
X%%PORTDOCS%%share/examples/spellutils/aspell.sl
X%%PORTDOCS%%@dirrm share/doc/spellutils
X%%PORTDOCS%%@dirrm share/examples/spellutils
X@dirrm share/locale/da/LC_MESSAGES
X@dirrm share/locale/da
X@dirrm share/locale
X@dirrm share
END-of-/usr/ports/textproc/spellutils/pkg-plist
echo x - /usr/ports/textproc/spellutils/pkg-comment
sed 's/^X//' >/usr/ports/textproc/spellutils/pkg-comment << 'END-of-/usr/ports/textproc/spellutils/pkg-comment'
XPrograms used to isolate some parts or texts before spell-checking
END-of-/usr/ports/textproc/spellutils/pkg-comment
echo c - /usr/ports/textproc/spellutils/files
mkdir -p /usr/ports/textproc/spellutils/files > /dev/null 2>&1
echo x - /usr/ports/textproc/spellutils/files/aspell.sl
sed 's/^X//' >/usr/ports/textproc/spellutils/files/aspell.sl << 'END-of-/usr/ports/textproc/spellutils/files/aspell.sl'
X% This macro demonstrates the use of the post_filter_hook
X% In your .slrnrc, add the line `interpret "/usr/local/share/examples/spellutils/aspell.sl"'
X
X%static
Xdefine aspell_file (file)
X{
X   variable cmd = "/usr/local/bin/newsbody -qs -k Subject -n '%s' -p /usr/local/bin/aspell -- -c -x %%f";
X   () = system (sprintf (cmd, file));
X}
X
X
Xdefine post_filter_hook (file)
X{
X   variable rsp;
X   variable cmd;
X   
X   forever 
X     {
X	rsp = get_response ("NnAa",
X			    "Select Filter? \001None, \001Aspell");
X	
X	switch (rsp)
X	  {
X	   case 'a' or case 'A':
X	     aspell_file (file);
X	  }
X	  {
X	   case 'n' or case 'N':
X	     return;
X	  }
X     }
X}
END-of-/usr/ports/textproc/spellutils/files/aspell.sl
exit



>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020731205555.904737627>