From aa5bcb518d4f6b25e4ebe3f1f59fee74b9ab327f Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 6 Jul 2022 12:31:06 +0200 Subject: Update --- .local/bin/mutt_md2html.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 .local/bin/mutt_md2html.sh (limited to '.local') 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 "\"$htmlFile\"" >> "$commandsFile" + +# Set it as inline +echo -n "" >> "$commandsFile" + +# Tell neomutt to delete it after sending +echo -n "" >> "$commandsFile" + +# Select both the html and markdown files +echo -n "" >> "$commandsFile" + +# Group the selected messages as alternatives +echo -n "" >> "$commandsFile" -- cgit v1.2.3