![]() ![]() This allows TextExpander to utilise the full power of the Terminal, as well as the full power of scripting languages like Perl, Python and Ruby. The scripts can be written in AppleScript, JavaScript, and any scripting language supported in the OS X terminal. However, the thing that really makes TextExpander powerful in my mind is it’s ability to execute a script to generate the replacement text. The next level of complexity is that you can include special codes to make TextExpander popup a little form when ever you type the abbreviation into which you then fill in information that gets included in the replacement text. The next level up would be to include special codes to inject data into the replacements, for example, I have a snippet that replaces *di with the current date and my initials, the content of that snippet is %d-%m-%Y BB – %d gets replaced with the day part of the current date, %m the month part of the current date etc. Snippets can be very simple replacements like expanding *bb into Bart Busschots, but they can also be much more complex. Each of these abbreviations/expansion pairs are referred to as snippets within TextExpander. TextExpander’s raison d’être is to monitor everything you type, looking for abbreviations you have defined, and replacing them with expansions you have defined as you type. TextExpander is one of the first things I install on every new Mac. TextExpander is a paid-for Mac-only app, but one I would argue is well worth the price of admission. My solution is built using a number of building blocks, but the glue that holds it all together is TextExpander. I explained my solution, and she asked if I could build a variant for her that generates the same style of links in HTML format. Allison asked me how I did my links, because she thought they looked good, and she assumed I would have automated the process in some way. I do my show notes in Markdown, so my initial solution produced links in Markdown format. Doing this manually would be a really big pain in the backside because there are often more than 50 links in the notes for a single episode! Clearly, this needed automation. To balance those two requirements, I decided to use the domain part of the URL with /. Particularly for Let’s Talk Apple and the Security Stuff segment on the Nosillacast, I want to clearly show where the news story came from. Bringing me one step closer to an application agnostic workflow.What’s the problem to be solved? When doing show notes for the various podcasts I contribute to, I generally have to include a lot of links. Now, any time I need to convert MultiMarkdown text into HTML, without the hassle of saving files and opening specific applications, I’ve got a quick, universal keyboard command I can use. Just like my other text processing scripts, proper use involves selecting the text to be processed, copying it to the clipboard, and invoking the snippet, which I’ve bound to the command mmd. The snippet: #!/bin/bash pbpaste | /usr/local/bin/mmd With its ability to act as an intermediary between text and scripts, TextExpander is the hammer that always gets the job done. When I need a system-wide tool that works in any application, activated by a few quick keys, the answer is almost always TextExpander. I’ll admit, I didn’t try very hard, but after Control + Clicking, trying my keyboard shortcuts, and doing a bit of searching online, I quickly gave up and decided to build a tool I knew would work. It’s probably due to the myriad of tools at my disposal that I only recently discovered I’m unable to use Brett’s OS X Services in Sublime Text 2. For the times I don’t need a full MultiMarkdown document, just a small snippet of text, I’ve got Brett Terpstra’s killer MultiMarkdown Service Tools. ![]() I’ve got a build system that lets Marked do the heavy lifting for me. I’ve created build systems for Sublime Text to convert MultiMarkdown documents to HTML files. There are almost as many ways to get your MultiMarkdown into HTML as there are applications that support Markdown. A Hammer For Every Season (Or Some Other Metaphor That Actually Makes Sense) Sometimes you just need some good old fashioned HTML. With more and more applications supporting Markdown natively, the need to convert the text to HTML is decreasing in frequency. That, or you’re at least fairly curious and have a plenty of free time. If you’re here, reading this site, chances are pretty good that you use and love MultiMarkdown as much as I do. ![]()
0 Comments
Leave a Reply. |