bin/mutt-html2txt

Tue, 07 Jan 2020 14:27:38 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Tue, 07 Jan 2020 14:27:38 -0600
changeset 847
3d460b026be9
parent 564
81f1da7a57e1
permissions
-rwxr-xr-x

Better multipart, working tmpfile cleanup

#!/bin/sh
set -eu

LINKS="links -html-tables 0 -html-image-names 0 -html-margin 0"
FILE=${1:--}

[ "$FILE" != '-' ] &&
  exec $LINKS -dump $FILE

TMPHTML="$(mktemp).html"
cat > $TMPHTML
$LINKS -dump $TMPHTML
rm -f $TMPHTML

mercurial