mail: Use new neomutt styling, extend html view

This commit is contained in:
Marty Oehme 2022-03-19 11:34:29 +01:00
parent 3e00e84319
commit bd71cfc168
Signed by: Marty
GPG key ID: B7538B8F50A1C800
9 changed files with 501 additions and 75 deletions

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# render html as markdown and display in glow, supports syntax highlighting
# requires: html2text, glow
# author: CEUK
perl -0777pe 's/(<code class="sourceCode\s?)(\w+?)(">)(.*?)(<\/code>)/\1\2\3\n```\2\n\4\n```\n\5/gs' "$1" | html2text | sed -re 's/^\s+(```(\w+)?)/\1/gm' >/tmp/mutt.md
glow -s ~/.config/glow/email.json /tmp/mutt.md | sed 's/\x1b\[[6-9;]*m//g'