Last active
May 9, 2023 19:29
-
-
Save Konfekt/09e0eff9db36c4478df7ce983c0e4ad4 to your computer and use it in GitHub Desktop.
mutt key binding to compile markdown to HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# press M in the mutt compose menu before sending to convert | |
# the markdown syntax of the e-mail text into an HTML e-mail | |
macro compose M "<pipe-entry>tee /tmp/message.txt | pandoc --standalone --from markdown --to html --metadata title=Message --output=/tmp/message.html<enter><attach-file>/tmp/message.txt<enter><toggle-disposition><edit-description>Message in TEXT format<enter><edit-type><kill-line>text/plain; charset=utf-8<Enter><first-entry><detach-file><attach-file>/tmp/message.html<enter><toggle-disposition><edit-description>Message in HTML format<enter><edit-type><kill-line>text/html; charset=utf-8<Enter>" "attach HTML message converted from Markdown" | |
# alternatively, use discount instead of pandoc ... | |
# macro compose M "<pipe-entry>tee /tmp/message.txt | mkd2html > /tmp/message.html<enter>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment