From: martin f. krafft Date: Mon, 20 Aug 2018 03:20:18 +0000 (+1200) Subject: put html dumping into a wrapper script X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/91e68e854725d35f09a09b4a60b525e81d8186f6?ds=inline put html dumping into a wrapper script --- diff --git a/.gitignore.d/mutt b/.gitignore.d/mutt index bfea42a..757457b 100644 --- a/.gitignore.d/mutt +++ b/.gitignore.d/mutt @@ -15,6 +15,7 @@ !/.mutt/.gitignore !/.mutt/headers !/.mutt/hooks +!/.mutt/htmldump !/.mutt/icalparser !/.mutt/keybindings !/.mutt/list-mailboxes diff --git a/.mutt/htmldump b/.mutt/htmldump new file mode 100755 index 0000000..d8d9ff7 --- /dev/null +++ b/.mutt/htmldump @@ -0,0 +1,5 @@ +#!/bin/sh + +exec elinks -anonymous -localhost -eval "set document.codepage.assume = '$2'" \ + -force-html -dump -dump-charset utf-8 -dump-color-mode 0 | + sed -re 's,^[[:space:]]{3},,' diff --git a/.mutt/mailcap.htmldump b/.mutt/mailcap.htmldump index 217e858..6a3743d 100644 --- a/.mutt/mailcap.htmldump +++ b/.mutt/mailcap.htmldump @@ -2,4 +2,4 @@ # Mutt mailcap for dumping HTML to text # -text/html; elinks -anonymous -localhost -eval "set document.codepage.assume = %{charset}" -force-html -dump -dump-charset utf-8 -dump-color-mode 4; description=HTML Text; nametemplate=%s.html; copiousoutput +text/html; ~/.mutt/htmldump --from %{charset}; description=HTML Text; nametemplate=%s.html; copiousoutput