diff options
author | Joe <bousset.rudy@gmail.com> | 2022-07-06 12:31:06 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-07-06 12:31:06 +0200 |
commit | aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f (patch) | |
tree | c6cc61474695abaec446b1780c92899d61290fde /.local/bin/mutt_md2html.sh | |
parent | update (diff) | |
download | dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.tar.gz dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.tar.bz2 dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.tar.xz dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.tar.zst dotfiles-bsd-aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f.zip |
Update
Diffstat (limited to '.local/bin/mutt_md2html.sh')
-rwxr-xr-x | .local/bin/mutt_md2html.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.local/bin/mutt_md2html.sh b/.local/bin/mutt_md2html.sh new file mode 100755 index 0000000..0756ea7 --- /dev/null +++ b/.local/bin/mutt_md2html.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +commandsFile="/tmp/neomutt-commands" +markdownFile="/tmp/neomutt-markdown" +htmlFile="/tmp/neomutt.html" + +cat - > "$markdownFile" +echo -n "push " > "$commandsFile" + +pandoc -f markdown -t html5 --standalone "$markdownFile" > "$htmlFile" + +# Attach the html file +echo -n "<attach-file>\"$htmlFile\"<enter>" >> "$commandsFile" + +# Set it as inline +echo -n "<toggle-disposition>" >> "$commandsFile" + +# Tell neomutt to delete it after sending +echo -n "<toggle-unlink>" >> "$commandsFile" + +# Select both the html and markdown files +echo -n "<tag-entry><previous-entry><tag-entry>" >> "$commandsFile" + +# Group the selected messages as alternatives +echo -n "<group-alternatives>" >> "$commandsFile" |