SubEthaEdit Markdown Preview
In lieu of a “Filter before Preview” option in SubEthaEdit, try the following as an AppleScript. It will open the front document in Safari after running Markdown (or Textile, or any similar filter) on it. Yes, it’s a bit of a hack, but it works, which is the main thing.
set command to "/usr/local/bin/Markdown.pl"
tell application "SubEthaEdit"
set content to text of front document
set doc to (name of front document) as text
log doc
do shell script "echo " & quoted form of content &
" | " & command & " > /tmp/" & quoted form of doc & ".html"
end tell
tell application "Safari"
open ":tmp:" & doc & ".html"
end tell
Comment by Chris Clark • Tue 25 Jul 06, 7:18 pm #
Caveat emptor: in the current version of SubEthaEdit (2.5), the line:
`set content to text of front document`
Must be edited to:
`set content to plain text of front document`
That is all.
Pingback by Markdown, blog és mac - Worldshots • Fri 6 Oct 06, 8:52 pm #
[…] A megoldás igazi szépsége abban rejlik, hogy több módon is beilleszthető mac környezetbe. A Humane Text Service a szervíz menüben ülve konvertál XHTML és Markdown közt - nálam ugyan fennakadt az ő/ű karaktereken -, a legeditorabb Textmate alapból támogatja a Markdownt - és bővíthető XML-RPC klienssel is! -, és még SubEthaEdithez is található preview szkript. […]