[MlMt] Replacing the Markdown processor
Kee Hinckley
kee+freron at hinckley.com
Mon Dec 2 07:53:44 EST 2013
From the docs, it seemed as though creating
{
name = 'Markdown to HTML';
events = ( 'email.display' );
input = 'canonical';
output = 'html';
select = '(content-type.type !exists or (content-type.type = text and
content-type.subtype = plain)) and content-type.markup = markdown';
script = '#!/usr/bin/env bash\necho "<div
markup=\\"markdown\\">"\n/usr/local/bin/multimarkdown\necho "</div>"\n';
uuid = 'DB65F8BE-6DE5-4BD5-AB9A-0A27599BE8C5';
}
in /Users/nazgul/Library/Application Support/MailMate/Scripts should
have replaced the Markdown pre-processor, but that didn't seem to work,
nor did editing the same file in the MailMate app itself. In fact, I
finally had to replace the ``sundown`` program with a shell script.
What's particularly odd though, is that MailMate is putting a UID in the
output that is sent to the Markdown pre-processor, and it's including it
just before the last line. So I ended up having the following
script.[^foot]
#!/bin/sh
tee /tmp/foo.mailmate | sed -e 's/2
AE883AA-33F3-4330-A544-A3B12C621468//g' | /usr/local/bin/multimarkdown
[^foot]: I included a space in the UID above, since otherwise my script
removes it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20131202/cb2f01f2/attachment.html>
More information about the mailmate
mailing list