Thu, 25 Mar 2004

Markdown As An OS X Service

Systemwide Markdown text filter functionality in OS X, howto.

Gust’s HumaneText.service has been updated to rev 3 and supports Markdown natively, so my hack is no longer necessary.

I'm happy to report that it's possible with fairly minimal effort to get Markdown.pl to function as a service in OS X. This makes Markdown functionality available inside of Cocoa text fields, which means that everything from Safari to Mail to SubEthaEdit to Stickies can benefit.

First download Gust's HumaneText service.

By default, it's configured to use PyTextile, but the package also includes ATX.

Install it, then, using Terminal, navigate to

~/Library/Services/HumaneText.service/Contents/Resources

Copy Markdown.pl to this directory. Make it executable with this command:

chmod 755 Markdown.pl

This is the directory that contains the text filters used by the HumaneText service. The service chooses which filter to invoke by means of a simple symlink. Delete the existing symlink:

rm filter

and recreate it, pointing to Markdown.pl

ln -s Markdown.pl filter

Tested under OS X 10.3.3.

:: 12:33
:: /tech/computers/os/osx/applications | [+]
::Comments (0)

Name:
E-mail:
URL:
Comment:
The Magic Word:
Which planet is closest to the sun? (hint -- it's Mercury...)




… Another writer again agreed with all my generalities, but said that as an
inveterate skeptic I have closed my mind to the truth. Most notably I have
ignored the evidence for an Earth that is six thousand years old. Well, I
haven’t ignored it; I considered the purported evidence and *then* rejected
it. There is a difference, and this is a difference, we might say, between
prejudice and postjudice. Prejudice is making a judgment before you have
looked at the facts. Postjudice is making a judgment afterwards. Prejudice
is terrible, in the sense that you commit injustices and you make serious
mistakes. Postjudice is not terrible. You can’t be perfect of course; you
may make mistakes also. But it is permissible to make a judgment after you
have examined the evidence. In some circles it is even encouraged.
— Carl Sagan, “The Burden of Skepticism”