]> git.madduck.net Git - etc/mutt.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

put html dumping into a wrapper script
authormartin f. krafft <madduck@madduck.net>
Mon, 20 Aug 2018 03:20:18 +0000 (15:20 +1200)
committermartin f. krafft <madduck@madduck.net>
Mon, 20 Aug 2018 03:20:31 +0000 (15:20 +1200)
.gitignore.d/mutt
.mutt/htmldump [new file with mode: 0755]
.mutt/mailcap.htmldump

index bfea42ac76a9c2394baf1d627cea37cd725c4961..757457b29ca3cd88b53c70ab296922858d5355ad 100644 (file)
@@ -15,6 +15,7 @@
 !/.mutt/.gitignore
 !/.mutt/headers
 !/.mutt/hooks
 !/.mutt/.gitignore
 !/.mutt/headers
 !/.mutt/hooks
+!/.mutt/htmldump
 !/.mutt/icalparser
 !/.mutt/keybindings
 !/.mutt/list-mailboxes
 !/.mutt/icalparser
 !/.mutt/keybindings
 !/.mutt/list-mailboxes
diff --git a/.mutt/htmldump b/.mutt/htmldump
new file mode 100755 (executable)
index 0000000..d8d9ff7
--- /dev/null
@@ -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},,'
index 217e8586859cb998449b217a2f4fe1833d5f553e..6a3743dbdf5e8c8b674d018d9ce15696d694420e 100644 (file)
@@ -2,4 +2,4 @@
 # Mutt mailcap for dumping HTML to text
 #
 
 # 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