Hello community,
here is the log from the commit of package twilio-utils for openSUSE:13.1 checked in at 2013-09-23 16:05:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1/twilio-utils (Old)
and /work/SRC/openSUSE:13.1/.twilio-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "twilio-utils"
Changes:
--------
--- /work/SRC/openSUSE:13.1/twilio-utils/twilio-utils.changes 2013-09-23 11:13:31.000000000 +0200
+++ /work/SRC/openSUSE:13.1/.twilio-utils.new/twilio-utils.changes 2013-09-23 16:05:48.000000000 +0200
@@ -1,0 +2,17 @@
+Sat Sep 21 17:55:17 UTC 2013 - archie@dellroad.org
+
+- Change dependency from "xsltproc" to "libxslt-tools"
+
+-------------------------------------------------------------------
+Sat Sep 21 17:51:22 UTC 2013 - archie@dellroad.org
+
+- Update to release 1.0.5
+ * Fix bug in 1.0.4 not using updated REST URL
+
+-------------------------------------------------------------------
+Wed Sep 18 22:52:38 UTC 2013 - archie@dellroad.org
+
+- Update to release 1.0.4
+ * Added `-C', `-m' and `-t' flags to twimsg(1)
+
+-------------------------------------------------------------------
Old:
----
twilio-utils-1.0.3.tar.gz
New:
----
twilio-utils-1.0.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ twilio-utils.spec ++++++
--- /var/tmp/diff_new_pack.Qe0Uf5/_old 2013-09-23 16:05:48.000000000 +0200
+++ /var/tmp/diff_new_pack.Qe0Uf5/_new 2013-09-23 16:05:48.000000000 +0200
@@ -1,45 +1,47 @@
#
-# twilio-utils - Command line utilities for Twilio users
+# spec file for package twilio-utils
#
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2013 Archie L. Cobbs
#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
+
%define twilogdir %{_var}/lib/twilog
%define pkgdir %{_datadir}/%{name}
%define defaultconf %{_sysconfdir}/twilio.conf
Name: twilio-utils
-Version: 1.0.3
+Version: 1.0.5
Release: 0
-License: Apache-2.0
Summary: Command line utilities for Twilio users
+License: Apache-2.0
Group: Productivity/Text/Utilities
Source: %{name}-%{version}.tar.gz
-URL: http://twilio-utils.googlecode.com/
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
+Url: http://twilio-utils.googlecode.com/
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: curl
BuildRequires: gcc
+BuildRequires: libxslt-tools
BuildRequires: make
BuildRequires: php5
BuildRequires: util-linux
BuildRequires: xmlstarlet
-BuildRequires: xsltproc
Requires: curl >= 7.18
+Requires: libxslt-tools
Requires: php5
Requires: util-linux
Requires: xmlstarlet
-Requires: xsltproc
%description
The twilio-utils project contains a few UNIX command-line utilities
++++++ twilio-utils-1.0.3.tar.gz -> twilio-utils-1.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twilio-utils-1.0.3/CHANGES new/twilio-utils-1.0.5/CHANGES
--- old/twilio-utils-1.0.3/CHANGES 2013-05-28 17:32:37.000000000 +0200
+++ new/twilio-utils-1.0.5/CHANGES 2013-09-21 19:47:27.000000000 +0200
@@ -1,3 +1,11 @@
+Version 1.0.5 (r32) Released Sep 21, 2013
+
+ - Fix bug in 1.0.4 not using updated REST URL
+
+Version 1.0.4 (r30) Released Sep 18, 2013
+
+ - Added `-C', `-m' and `-t' flags to twimsg(1)
+
Version 1.0.3 (r27) Released May 28, 2013
- Fixed bug in twimsg `-e' flag not transcoding correctly
@@ -16,4 +24,4 @@
- Initial release
-$Id: CHANGES 27 2013-05-28 15:32:36Z archie.cobbs $
+$Id: CHANGES 32 2013-09-21 17:47:24Z archie.cobbs $
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twilio-utils-1.0.3/configure new/twilio-utils-1.0.5/configure
--- old/twilio-utils-1.0.3/configure 2013-05-28 17:33:01.000000000 +0200
+++ new/twilio-utils-1.0.5/configure 2013-09-21 19:47:39.000000000 +0200
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for twilio-utils - Command line utilities for Twilio users 1.0.3.
+# Generated by GNU Autoconf 2.69 for twilio-utils - Command line utilities for Twilio users 1.0.5.
#
# Report bugs to http://twilio-utils.googlecode.com/.
#
@@ -581,8 +581,8 @@
# Identity of this package.
PACKAGE_NAME='twilio-utils - Command line utilities for Twilio users'
PACKAGE_TARNAME='twilio-utils'
-PACKAGE_VERSION='1.0.3'
-PACKAGE_STRING='twilio-utils - Command line utilities for Twilio users 1.0.3'
+PACKAGE_VERSION='1.0.5'
+PACKAGE_STRING='twilio-utils - Command line utilities for Twilio users 1.0.5'
PACKAGE_BUGREPORT='http://twilio-utils.googlecode.com/'
PACKAGE_URL=''
@@ -1272,7 +1272,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures twilio-utils - Command line utilities for Twilio users 1.0.3 to adapt to many kinds of systems.
+\`configure' configures twilio-utils - Command line utilities for Twilio users 1.0.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1338,7 +1338,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of twilio-utils - Command line utilities for Twilio users 1.0.3:";;
+ short | recursive ) echo "Configuration of twilio-utils - Command line utilities for Twilio users 1.0.5:";;
esac
cat <<\_ACEOF
@@ -1428,7 +1428,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-twilio-utils - Command line utilities for Twilio users configure 1.0.3
+twilio-utils - Command line utilities for Twilio users configure 1.0.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1730,7 +1730,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by twilio-utils - Command line utilities for Twilio users $as_me 1.0.3, which was
+It was created by twilio-utils - Command line utilities for Twilio users $as_me 1.0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2554,7 +2554,7 @@
# Define the identity of the package.
PACKAGE='twilio-utils'
- VERSION='1.0.3'
+ VERSION='1.0.5'
cat >>confdefs.h <<_ACEOF
@@ -4966,7 +4966,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by twilio-utils - Command line utilities for Twilio users $as_me 1.0.3, which was
+This file was extended by twilio-utils - Command line utilities for Twilio users $as_me 1.0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5032,7 +5032,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-twilio-utils - Command line utilities for Twilio users config.status 1.0.3
+twilio-utils - Command line utilities for Twilio users config.status 1.0.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twilio-utils-1.0.3/configure.ac new/twilio-utils-1.0.5/configure.ac
--- old/twilio-utils-1.0.3/configure.ac 2013-05-28 17:23:00.000000000 +0200
+++ new/twilio-utils-1.0.5/configure.ac 2013-09-21 19:45:35.000000000 +0200
@@ -18,7 +18,7 @@
# $Id$
#
-AC_INIT([twilio-utils - Command line utilities for Twilio users], [1.0.3], [http://twilio-utils.googlecode.com/], [twilio-utils])
+AC_INIT([twilio-utils - Command line utilities for Twilio users], [1.0.5], [http://twilio-utils.googlecode.com/], [twilio-utils])
AC_CONFIG_AUX_DIR(scripts)
AM_INIT_AUTOMAKE
dnl AM_MAINTAINER_MODE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twilio-utils-1.0.3/result.xsl new/twilio-utils-1.0.5/result.xsl
--- old/twilio-utils-1.0.3/result.xsl 2013-05-17 23:40:15.000000000 +0200
+++ new/twilio-utils-1.0.5/result.xsl 2013-09-21 19:47:27.000000000 +0200
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- $Id: result.xsl 2 2013-05-17 21:40:09Z archie.cobbs $ -->
+<!-- $Id: result.xsl 32 2013-09-21 17:47:24Z archie.cobbs $ -->
http://www.w3.org/1999/XSL/Transform" version="1.0">
@@ -10,7 +10,7 @@
-
+
xsl:otherwise
xsl:textInvalid XML response received
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twilio-utils-1.0.3/twimsg new/twilio-utils-1.0.5/twimsg
--- old/twilio-utils-1.0.3/twimsg 2013-05-28 17:33:07.000000000 +0200
+++ new/twilio-utils-1.0.5/twimsg 2013-09-21 19:47:46.000000000 +0200
@@ -1,14 +1,14 @@
#!/bin/bash
-# $Id: twimsg.in 24 2013-05-27 16:07:13Z archie.cobbs $
+# $Id: twimsg.in 32 2013-09-21 17:47:24Z archie.cobbs $
# Bail on error
set -e
# Constants
DEFAULT_CONFIG_FILE='/etc/twilio.conf'
-MAX_PAYLOAD_BYTES='140'
+DEFAULT_TRUNCATE_LIMIT='140'
BASE_URL='https://api.twilio.com/'
-ACCOUNTS_PATH='/2010-04-01/Accounts/${ACCOUNT_SID}/SMS/Messages'
+ACCOUNTS_PATH='/2010-04-01/Accounts/${ACCOUNT_SID}/Messages'
RESULT_XSL='/usr/share/twilio-utils/result.xsl'
CURL="/usr/bin/curl"
ICONV="/usr/bin/iconv"
@@ -20,12 +20,15 @@
# Usage message
usage()
{
- echo "Usage: twimsg [-c config.txt] [-e encoding] [-F from-number] [-f file] number" 1>&2
+ echo "Usage: twimsg [-c config.txt] [-C curlflag] [-e encoding] [-F from-number] [-f file] [-m url] [-t limit] number" 1>&2
echo "Options:" 1>&2
+ echo " -C Pass curlflag to curl(1)" 1>&2
echo " -c Specify config file (default \"${DEFAULT_CONFIG_FILE}\")" 1>&2
echo " -e Specify input encoding (default \"${DEFAULT_ENCODING}\")" 1>&2
echo " -f Read message from file (\`-' means stdin (the default))" 1>&2
+ echo " -m Include the image at the specified URL via MMS (may be repeated)" 1>&2
echo " -F Specify sending phone number (10 digits)" 1>&2
+ echo " -t Truncate input at limit bytes (default ${DEFAULT_TRUNCATE_LIMIT})" 1>&2
}
# Function to normalize a phone number to the way Twilio likes it
@@ -39,8 +42,10 @@
# Parse flags passed in on the command line
CONFIG_FILE="${DEFAULT_CONFIG_FILE}"
ENCODING="${DEFAULT_ENCODING}"
+TRUNCATE_LIMIT="${DEFAULT_TRUNCATE_LIMIT}"
FROM_NUMBER=""
INPUT_FILE="-"
+CURL_FLAGS=""
while [ ${#} -gt 0 ]; do
case "$1" in
-c)
@@ -48,6 +53,11 @@
CONFIG_FILE="${1}"
shift
;;
+ -C)
+ shift
+ CURL_FLAGS="${CURL_FLAGS} ${1}"
+ shift
+ ;;
-e)
shift
ENCODING="${1}"
@@ -63,6 +73,21 @@
FROM_NUMBER="${1}"
shift
;;
+ -m)
+ shift
+ IMAGE_URL="${1}"
+ if ! [[ "${IMAGE_URL}" =~ ^https?://[^[:space:]]+$ ]]; then
+ echo "twimsg: invalid image URL \`${IMAGE_URL}'" 1>&2
+ exit 1
+ fi
+ shift
+ CURL_FLAGS="${CURL_FLAGS} --data-urlencode MediaUrl=${IMAGE_URL}"
+ ;;
+ -t)
+ shift
+ TRUNCATE_LIMIT="${1}"
+ shift
+ ;;
-h|--help)
usage
exit
@@ -134,16 +159,17 @@
fi
trap "rm -f ${RESPONSE_FILE} ${ERROR_FILE}" 0 2 3 5 10 13 15
-# Truncate input to 140 payload bytes and post to Twilio
+# Truncate input and post to Twilio
cat "${INPUT_FILE}" \
| "${ICONV}" -c -s -f "${ENCODING}" -t "${TWILIO_ENCODING}" \
- | "${SMSLEN}" -i "${TWILIO_ENCODING}" -t "${MAX_PAYLOAD_BYTES}" \
+ | "${SMSLEN}" -i "${TWILIO_ENCODING}" -t "${TRUNCATE_LIMIT}" \
| "${CURL}" --silent \
--user "${ACCOUNT_SID}:${AUTH_TOKEN}" \
--data "From=${FROM_NUMBER}" \
--data "To=${TO_NUMBER}" \
--data-urlencode "Body@-" \
--output "${RESPONSE_FILE}" \
+ ${CURL_FLAGS} \
"${URL}"
# Check result
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twilio-utils-1.0.3/twimsg.1.in new/twilio-utils-1.0.5/twimsg.1.in
--- old/twilio-utils-1.0.3/twimsg.1.in 2013-05-27 18:07:14.000000000 +0200
+++ new/twilio-utils-1.0.5/twimsg.1.in 2013-09-19 00:47:36.000000000 +0200
@@ -14,7 +14,7 @@
.\" License for the specific language governing permissions and limitations
.\" under the License.
.\"
-.\" $Id: twimsg.1.in 24 2013-05-27 16:07:13Z archie.cobbs $
+.\" $Id: twimsg.1.in 29 2013-09-18 22:47:31Z archie.cobbs $
.\"
.Dd May 17, 2013
.Dt TWIMSG 1
@@ -25,11 +25,14 @@
.Sh SYNOPSIS
.Nm twimsg
.Bk -words
-.Op Fl e Ar encoding
.Op Fl c Ar config
+.Op Fl C Ar curlflag
+.Op Fl e Ar encoding
.Op Fl F Ar number
.Op Fl f Ar file
-.Op number
+.Op Fl m Ar URL
+.Op Fl t Ar limit
+.Ar number
.Ek
.Sh DESCRIPTION
.Nm
@@ -42,17 +45,11 @@
.Fl f
flag is used.
.Pp
-The input is automatically truncated at the point at which it would exceed the 140 byte SMS payload limit.
-See
-.Xr smslen 1
-for information on calculating this limit.
+The input is automatically truncated at the point at which it would exceed
+.Ar limit
+encoded bytes (default 140).
.Sh OPTIONS
.Bl -tag -width Ds
-.It Fl e
-Specify input character encoding.
-The default is UTF-8.
-.Pp
-Invalid character data is silently discarded.
.It Fl c
Specify the configuration file.
.Pp
@@ -72,12 +69,36 @@
flag is not specified,
.Pa @defaultconf@
is assumed.
+.It Fl C
+Pass
+.Ar curlflag
+to
+.Xr curl 1 .
+.It Fl e
+Specify input character encoding.
+The default is UTF-8.
+.Pp
+Invalid character data is silently discarded.
.It Fl F
Specify the sending SMS phone number.
This flag is required if the configuration file does not define a default
.Pa FROM_NUMBER .
.It Fl f
Read the message content from the specified file instead of standard input.
+.It Fl m
+Send an MMS message using the image found at the specified
+.Ar URL .
+This flag may be repeated to send multiple images.
+.It Fl t
+Truncate the message when it would exceed
+.Ar limit
+bytes.
+The default is 140, which keeps it within a single SMS message.
+.Pp
+Note Twilio supports automatic outgoing message concatenation;
+to take advantage of this feature, use
+.Fl t Ar 3200
+instead.
.El
.Sh EXIT STATUS
.Nm
@@ -85,6 +106,7 @@
.Pp
Errors returned from the Twilio REST API are reported to standard error.
.Sh SEE ALSO
+.Xr curl 1 ,
.Xr smslen 1 ,
.Xr twilog 1 .
.Sh AUTHOR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twilio-utils-1.0.3/twimsg.in new/twilio-utils-1.0.5/twimsg.in
--- old/twilio-utils-1.0.3/twimsg.in 2013-05-27 18:07:14.000000000 +0200
+++ new/twilio-utils-1.0.5/twimsg.in 2013-09-21 19:47:27.000000000 +0200
@@ -1,14 +1,14 @@
#!/bin/bash
-# $Id: twimsg.in 24 2013-05-27 16:07:13Z archie.cobbs $
+# $Id: twimsg.in 32 2013-09-21 17:47:24Z archie.cobbs $
# Bail on error
set -e
# Constants
DEFAULT_CONFIG_FILE='@defaultconf@'
-MAX_PAYLOAD_BYTES='140'
+DEFAULT_TRUNCATE_LIMIT='140'
BASE_URL='https://api.twilio.com/'
-ACCOUNTS_PATH='/2010-04-01/Accounts/${ACCOUNT_SID}/SMS/Messages'
+ACCOUNTS_PATH='/2010-04-01/Accounts/${ACCOUNT_SID}/Messages'
RESULT_XSL='@pkgdatadir@/result.xsl'
CURL="@CURL@"
ICONV="@ICONV@"
@@ -20,12 +20,15 @@
# Usage message
usage()
{
- echo "Usage: twimsg [-c config.txt] [-e encoding] [-F from-number] [-f file] number" 1>&2
+ echo "Usage: twimsg [-c config.txt] [-C curlflag] [-e encoding] [-F from-number] [-f file] [-m url] [-t limit] number" 1>&2
echo "Options:" 1>&2
+ echo " -C Pass curlflag to curl(1)" 1>&2
echo " -c Specify config file (default \"${DEFAULT_CONFIG_FILE}\")" 1>&2
echo " -e Specify input encoding (default \"${DEFAULT_ENCODING}\")" 1>&2
echo " -f Read message from file (\`-' means stdin (the default))" 1>&2
+ echo " -m Include the image at the specified URL via MMS (may be repeated)" 1>&2
echo " -F Specify sending phone number (10 digits)" 1>&2
+ echo " -t Truncate input at limit bytes (default ${DEFAULT_TRUNCATE_LIMIT})" 1>&2
}
# Function to normalize a phone number to the way Twilio likes it
@@ -39,8 +42,10 @@
# Parse flags passed in on the command line
CONFIG_FILE="${DEFAULT_CONFIG_FILE}"
ENCODING="${DEFAULT_ENCODING}"
+TRUNCATE_LIMIT="${DEFAULT_TRUNCATE_LIMIT}"
FROM_NUMBER=""
INPUT_FILE="-"
+CURL_FLAGS=""
while [ ${#} -gt 0 ]; do
case "$1" in
-c)
@@ -48,6 +53,11 @@
CONFIG_FILE="${1}"
shift
;;
+ -C)
+ shift
+ CURL_FLAGS="${CURL_FLAGS} ${1}"
+ shift
+ ;;
-e)
shift
ENCODING="${1}"
@@ -63,6 +73,21 @@
FROM_NUMBER="${1}"
shift
;;
+ -m)
+ shift
+ IMAGE_URL="${1}"
+ if ! [[ "${IMAGE_URL}" =~ ^https?://[^[:space:]]+$ ]]; then
+ echo "twimsg: invalid image URL \`${IMAGE_URL}'" 1>&2
+ exit 1
+ fi
+ shift
+ CURL_FLAGS="${CURL_FLAGS} --data-urlencode MediaUrl=${IMAGE_URL}"
+ ;;
+ -t)
+ shift
+ TRUNCATE_LIMIT="${1}"
+ shift
+ ;;
-h|--help)
usage
exit
@@ -134,16 +159,17 @@
fi
trap "rm -f ${RESPONSE_FILE} ${ERROR_FILE}" 0 2 3 5 10 13 15
-# Truncate input to 140 payload bytes and post to Twilio
+# Truncate input and post to Twilio
cat "${INPUT_FILE}" \
| "${ICONV}" -c -s -f "${ENCODING}" -t "${TWILIO_ENCODING}" \
- | "${SMSLEN}" -i "${TWILIO_ENCODING}" -t "${MAX_PAYLOAD_BYTES}" \
+ | "${SMSLEN}" -i "${TWILIO_ENCODING}" -t "${TRUNCATE_LIMIT}" \
| "${CURL}" --silent \
--user "${ACCOUNT_SID}:${AUTH_TOKEN}" \
--data "From=${FROM_NUMBER}" \
--data "To=${TO_NUMBER}" \
--data-urlencode "Body@-" \
--output "${RESPONSE_FILE}" \
+ ${CURL_FLAGS} \
"${URL}"
# Check result
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org