summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2017-01-18 12:44:19 (GMT)
committer Jaromil <jaromil@dyne.org>2017-01-18 12:44:19 (GMT)
commit1ce1e40ce3197a49b81f674e1f1002fe726a0052 (patch)
tree7d97bb617920de2f19356c9f856618a7ee3d6fb7
parent8da47296a672b1a2a10621d70a87ce88c94b566d (diff)
vcal conversion of text/calendar when found
-rwxr-xr-xsrc/zlibs/filters10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/zlibs/filters b/src/zlibs/filters
index 5b902d7..a53df87 100755
--- 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