X-Git-Url: https://git.madduck.net/etc/mutt.git/blobdiff_plain/9777b1b01cb571ad1f698f9476d08f2873e471b8..a83d50d5a64488deb3796bbd0ca0a03b0516cc77:/.mutt/htmldump?ds=sidebyside diff --git a/.mutt/htmldump b/.mutt/htmldump index 906bd6d..c15ecd1 100755 --- a/.mutt/htmldump +++ b/.mutt/htmldump @@ -2,7 +2,7 @@ get_mutt_confvar() { local ret; - ret=$(mutt -D | sed -rne "s,^${1}(=| is ),,p") + ret=$(mutt -Q "$1" | sed -rne "s,\S+(=| is ),,p") case "$ret" in (set) echo return 0;; (unset) echo return 1;; @@ -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'" \