[TxMt] MultiMarkdown in TextMate

Mark Eli Kalderon m.kalderon at ucl.ac.uk
Tue Apr 4 21:41:03 UTC 2006


In case anyone is interested, I followed Brad's lead and created the  
following command for generating rtf from markdown:

Save: Nothing

Command(s):
# first figure out a name for the result
NAME="${TM_FILENAME:-untitled}"
BASENAME="${NAME%.*}"
DST="/tmp/$BASENAME"

MultiMarkdown.pl "$NAME" | SmartyPants.pl > "$DST.html"

/usr/bin/textutil -convert rtf - extension rtf -font Times -fontsize  
11 "$DST.html"

open -a TextEdit.app "$DST.rtf"

Input: Selected Text or Document

Output: Discard

One limitation---textutil won't generate rtf documents with images.

All the best, Mark
_________________
Mark Eli Kalderon
Department of Philosophy
University College London
Gower Street
London WC1E 6BT

Dept webpage: http://www.ucl.ac.uk/philosophy
Personal wepage: http://www.kalderon.demon.co.uk



More information about the textmate mailing list