commit 1ce1e40ce3197a49b81f674e1f1002fe726a0052
parent 8da47296a672b1a2a10621d70a87ce88c94b566d
Author: Jaromil <jaromil@dyne.org>
Date:   Wed, 18 Jan 2017 13:44:19 +0100
vcal conversion of text/calendar when found
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/zlibs/filters b/src/zlibs/filters
@@ -563,12 +563,15 @@ EOF
     }
 
     # MUTT MAILCAP
+
+	# charset conversion
     cat <<EOF > $MAILDIRS/.mutt/mailcap
 text/plain; iconv -f iso-8859-1 -t utf-8; test=charset=%{charset} \
   && test x`echo \"$charset\" | tr a-z A-Z` = xISO-8859-1; copiousoutput
 text/plain; cat %s
 EOF
 
+	# HTML conversion
     wwwtext=w3m
     if command -v elinks > /dev/null; then
     cat <<EOF >> $MAILDIRS/.mutt/mailcap
@@ -584,6 +587,13 @@ text/html; lynx -dump -assume_charset=%{charset} %s; nametemplate=%s.html; copio
 EOF
     fi
 
+	command -v vcal > /dev/null && {
+		# VCAL conversion
+	cat <<EOF >> $MAILDIRS/.mutt/mailcap
+text/calendar; vcal --all %s; nametemplate=%s.vcal; copiousoutput
+EOF
+	}
+
     { test -r "${MAILDIRS}/Applications.txt" } && {
 
         # here is the tweak to open attachments