]> git.madduck.net Git - etc/mutt.git/blobdiff - .mutt/htmldump

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:

add pandoc as htmldumper
[etc/mutt.git] / .mutt / htmldump
index 906bd6dc51f086e094b64abbf05be5ca8fb20df7..f5718e8d74208257e194b549653083ae191d2ac6 100755 (executable)
@@ -27,6 +27,11 @@ if command -v html2markdown >/dev/null; then
     --decode-errors=replace --images-to-alt - "$2"| \
     sed -re 's,^\\--[[:space:]]+$,-- ,'
 
+elif command -v pandoc >/dev/null; then
+
+  exec iconv -f "$2" -t utf-8 | pandoc -s -f html -t markdown_mmd \
+    --columns=$WIDTH
+
 elif command -v elinks >/dev/null; then
 
   exec elinks -anonymous -localhost -eval "set document.codepage.assume = '$2'" \