BBEdit-Markdown Extensions
The other day I was bugged by the fact that while I had a way to convert Markdown to RTF, I didn’t have a way to convert RTF to Markdown. I had all the tools, theoretically—so it should be easy, right?
As it turns out: not so much. RTF and AppleScript don’t get along very well, and no matter what I did in Automator I couldn’t get it to pass the clipboard as raw RTF data to AppleScript.
But.
I’ve pretty much made the transition from TextMate to BBEdit, and BBEdit is where I’m going to be doing most of my Markdown writing these days anyway. And BBEdit gets along pretty well with AppleScript. (Infamously well, those who—like me—are not AppleScript fans might say.)
I’ve put together a BBEdit 10 Package that includes the “Paste as Markdown” script; either you will never have a use for this or you’ll find it totally awesome, I suspect. (Not that it couldn’t be made more awesome; it’s got its share of rough edges.)
In addition to that, the package contains BBEdit-specific versions of most of my other services; while BBEdit has syntax highlighting for Markdown—and a pretty useful clipping set for it, if you haven’t peeked at it—it doesn’t have any transformational scripts. And, I added a couple helper scripts, one taken rather brazenly from Brett Terpstra’s Blogsmith bundle for TextMate. (Namely, the one feature of it that I miss!)
- Markdown to HTML
- HTML to Markdown
- Paste as Markdown
- Markdown to BBCode (kind of wonky so far)
- MultiMarkdown to HTML (requires MultiMarkdown 3.0 to be installed)
- Make Bulleted List
- Make Numbered List
- Safari Tabs to Reference List
Note that as of this writing the package is tested on exactly one machine (mine) and thus is guaranteed to work on exactly one machine (mine).