-ported revisions 330 & 337 from branch_0_4 (support sfftobmp 3.x)
git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@338 4ebea2bb-67d4-0310-8558-a5799e421b66
This commit is contained in:
parent
a22481c4fc
commit
53651069ec
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-11-07 Gernot Hillier <gernot@hillier.de>
|
||||
* configure.in: test for the sfftobmp version installed
|
||||
* acinclude.m4 (CS_TEST_SFFTOBMP): Likewise.
|
||||
* scripts/cs_helpers.pyin (sfftotiff,sendMIMEMail): New function which
|
||||
calls sfftobmp so that the parameters can be easily changed. Include
|
||||
two versions for sfftomp 2.x and 3.x. Thanks for reporting this
|
||||
issue goes to Edelhard Becker.
|
||||
* scripts/Makefile.am (.pyin.py): Choose the right sfftobmp call
|
||||
automatically during build.
|
||||
|
||||
2004-10-25 Gernot Hillier <gernot@hillier.de>
|
||||
* src/capisuite-py/config.py.in: minor documentation changes
|
||||
* src/capisuite-py/__init__.py: Likewise.
|
||||
|
|
6
NEWS
6
NEWS
|
@ -1,6 +1,12 @@
|
|||
0.5 (CVS nn):
|
||||
=============
|
||||
|
||||
* scripts: Adapted to work with the new parameters of sfftobmp 3.x.
|
||||
Normally, installed version will be detected automatically when
|
||||
building CapiSuite. If you change your sfftobmp version later,
|
||||
you'll have to adapt the function sfftotif at the beginning of
|
||||
cs_helpers.py manually.
|
||||
|
||||
* scripts: removed the special support for giving an empty voice_email/
|
||||
fax_email parameter. This is NOT allowed any more and will result in
|
||||
an error when sending the mail. Simply don't set these parameters
|
||||
|
|
21
acinclude.m4
21
acinclude.m4
|
@ -19,6 +19,9 @@ AC_DEFUN([CS_SET_DOCDIR],
|
|||
AC_SUBST(docdir)
|
||||
])
|
||||
|
||||
# CS_TEST_GCC3
|
||||
# ------------
|
||||
# Test for special gcc3 features needed by CapiSuite
|
||||
AC_DEFUN([CS_TEST_GCC3],
|
||||
[AC_MSG_CHECKING([for <ostream> header])
|
||||
AC_TRY_CPP([#include <ostream>],
|
||||
|
@ -51,6 +54,24 @@ AC_TRY_COMPILE([#include <capiutils.h>],
|
|||
)
|
||||
]) dnl CS_TEST_CAPI4LINUX
|
||||
|
||||
# CS_TEST_SFFTOBMP
|
||||
# ----------------
|
||||
# Test for the sfftobmp version installed as different versions
|
||||
# need different parameters. :-(
|
||||
AC_DEFUN([CS_TEST_SFFTOBMP],
|
||||
[
|
||||
AC_MSG_CHECKING([for sfftobmp version])
|
||||
sfftobmp_version=`sfftobmp -v 2>&1 | grep Version | sed -e "s,.*Version \([[0-9,.]]\),\1,"`
|
||||
sfftobmp_major_version=`echo $sfftobmp_version | sed -e "s,\..*,,"`
|
||||
if test -z $sfftobmp_major_version; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([sfftobmp not found])
|
||||
else
|
||||
AC_MSG_RESULT([$sfftobmp_version])
|
||||
AC_SUBST(sfftobmp_major_version)
|
||||
fi
|
||||
]) dnl CS_TEST_SFFTOBMP
|
||||
|
||||
# PGAC_CHECK_PYTHON_DIRS
|
||||
# -----------------------
|
||||
# Determine the name of various directory of a given Python installation.
|
||||
|
|
|
@ -17,6 +17,7 @@ AC_HEADER_TIME
|
|||
|
||||
CS_TEST_GCC3
|
||||
CS_TEST_CAPI4LINUX
|
||||
CS_TEST_SFFTOBMP
|
||||
|
||||
CS_SET_DOCDIR
|
||||
|
||||
|
|
|
@ -18,7 +18,13 @@ capisuitefax: capisuitefax.in
|
|||
|
||||
.pyin.py:
|
||||
rm -f $@
|
||||
sed -e 's,@\pkgsysconfdir@,$(pkgsysconfdir),g' $< >$@
|
||||
if test $(sfftobmp_major_version) = "2"; then
|
||||
sed -e 's,@\pkgsysconfdir@,$(pkgsysconfdir),g' \
|
||||
-e 's,#2,,g' $< >$@
|
||||
else
|
||||
sed -e 's,@\pkgsysconfdir@,$(pkgsysconfdir),g' \
|
||||
-e 's,#3,,g' $< >$@
|
||||
fi
|
||||
|
||||
.confin.conf:
|
||||
rm -f $@
|
||||
|
|
|
@ -11,10 +11,21 @@
|
|||
# (at your option) any later version.
|
||||
|
||||
import os, commands
|
||||
|
||||
from capisuite.config import *
|
||||
from capisuite.voice import sayNumber, getAudio
|
||||
|
||||
# Convert sff files to tiff files. This is placed in an extra function
|
||||
# because the sfftobmp tool used for this conversion has changed its
|
||||
# parameters recently. So this function can be changed to fit your needs.
|
||||
# Normally, the make environment of CapiSuite should do this automatically
|
||||
# but if you change your sfftobmp version after building CapiSuite you have
|
||||
# to adapt this manually.
|
||||
def sff2tif(infile, outfile):
|
||||
# for sfftobmp 2.x: remove the "#2" characters of the following line
|
||||
#2 __call('sff to tif', "sfftobmp", "-tif", infile, outfile)
|
||||
# for sfftobmp 3.x: remove the "#3" characters of the following line
|
||||
#3 __call('sff to tif', "sfftobmp", "-tif", infile, "-o", outfile)
|
||||
|
||||
# Note: readConfig is now imported from capisuite.config
|
||||
|
||||
# @brief escape a argument to include it savely in a shell command
|
||||
|
@ -37,7 +48,6 @@ def getOption(config, user, option, default=None):
|
|||
def uniqueName(*args, **kwargs):
|
||||
return capisuite.fileutils.uniqueName(*args, **kwargs)[1]
|
||||
|
||||
|
||||
def __sendmail(mail_from, mail_to, msg):
|
||||
import popen2, capisuite.core
|
||||
|
||||
|
@ -78,9 +88,6 @@ def __call(msg, cmd, *args):
|
|||
raise ConvertionError("Error while converting %s. "
|
||||
"File damaged or %s not installed?" %(msg, cmd))
|
||||
|
||||
def sff2tif(infile, outfile):
|
||||
__call('sff to tif', "sfftobmp", "-tif", infile, outfile)
|
||||
|
||||
def cff2ps(infile, outfile):
|
||||
__call("cff to ps", "jpeg2ps", "-m", infile , "-o", outfile)
|
||||
|
||||
|
|
Loading…
Reference in New Issue