1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/conf/mutt/muttrc.example Wed Nov 01 23:27:40 2017 +0100
1.3 @@ -0,0 +1,11 @@
1.4 +# Handle calendar messages.
1.5 +
1.6 +macro index,pager "<F2>" "\
1.7 +<enter-command>unset wait_key\n\
1.8 +<pipe-message> cat > \$HOME/.imipmsg\n\
1.9 +<shell-escape>/home/paulb/imip-agent/imip_mutt_handler.sh \
1.10 +\$HOME/.imipmsg \
1.11 +-u mailto:paul.boddie@example.com \
1.12 +-T file \
1.13 +-S /home/paulb/imip-agent/tmp_store \
1.14 +-p /home/paulb/imip-agent/tmp_prefs\n" "View/edit calendar object"
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/imip_mutt_handler.sh Wed Nov 01 23:27:40 2017 +0100
2.3 @@ -0,0 +1,52 @@
2.4 +#!/bin/sh
2.5 +
2.6 +# Invoke the text client from the Mutt mail client.
2.7 +#
2.8 +# Copyright (C) 2017 Paul Boddie <paul@boddie.org.uk>
2.9 +#
2.10 +# This program is free software; you can redistribute it and/or modify it under
2.11 +# the terms of the GNU General Public License as published by the Free Software
2.12 +# Foundation; either version 3 of the License, or (at your option) any later
2.13 +# version.
2.14 +#
2.15 +# This program is distributed in the hope that it will be useful, but WITHOUT
2.16 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2.17 +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2.18 +# details.
2.19 +#
2.20 +# You should have received a copy of the GNU General Public License along with
2.21 +# this program. If not, see <http://www.gnu.org/licenses/>.
2.22 +
2.23 +DIRNAME=`dirname "$0"`
2.24 +PROGNAME=`basename "$0"`
2.25 +
2.26 +if [ "$1" = "--help" ] || [ ! "$1" ]; then
2.27 + cat 1>&2 <<EOF
2.28 +Usage: $PROGNAME <filename> [ <options> ]
2.29 +
2.30 +Handle the calendar data provided in the file with the given filename.
2.31 +Additional options are presented to the client program to override any
2.32 +configuration defaults.
2.33 +
2.34 +Example:
2.35 +
2.36 +$PROGNAME message.txt
2.37 +EOF
2.38 + exit 1
2.39 +fi
2.40 +
2.41 +# Expect a filename for the calendar data
2.42 +
2.43 +INFILE="$1"
2.44 +
2.45 +if [ ! "$INFILE" ] || [ ! -e "$INFILE" ]; then
2.46 + cat 1>&2 <<EOF
2.47 +Need an input file containing a calendar object.
2.48 +EOF
2.49 +fi
2.50 +
2.51 +shift 1
2.52 +
2.53 +# Invoke the client to show the incoming object details.
2.54 +
2.55 +"$DIRNAME/imip_text_client.py" -f "$INFILE" --handle-data $@