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.
5 ret=$(mutt -Q "$1" | sed -rne "s,^(set )?\S+\s*(=|is)\s*,,p")
8 (unset) echo return 1;;
9 ('') echo "${2:-}"; return 1;;
14 WRAP=$(get_mutt_confvar wrap 0)
15 if [ $WRAP -lt 0 ]; then
16 WIDTH=$((${COLUMNS:-78} + $WRAP))
18 elif [ $WRAP -gt 0 ]; then
23 awesome-client <<-_eof
24 local naughty = require("naughty")
25 naughty.notify({ preset = naughty.config.presets.low,
26 title = "htmldump called",
31 if command -v html2markdown >/dev/null; then
33 exec html2markdown --asterisk-emphasis --body-width=$WIDTH --unicode-snob \
34 --no-skip-internal-links --links-after-para --no-wrap-links \
35 --decode-errors=replace --images-to-alt - "$2"| \
36 sed -re 's,^\\--[[:space:]]+$,-- ,'
38 elif command -v pandoc >/dev/null; then
40 exec iconv -f "$2" -t utf-8 | pandoc -s -f html -t markdown_mmd \
43 elif command -v elinks >/dev/null; then
45 exec elinks -anonymous -localhost -eval "set document.codepage.assume = '$2'" \
47 -eval "set document.browse.margin_width = 0" \
48 -force-html -dump -dump-charset utf-8 -dump-color-mode 0
50 elif command -v w3m >/dev/null; then
52 exec w3m -I "$2" -O utf-8 -T text/html -dump -cols $WIDTH
56 echo >&2 No HTML to text converter found.