• Home
  • Blog
  • Workshops
    • Workshops
    • What people say
    • Workshop Videos
    • One-on-one coaching
  • Photography
  • Podcast
    • Podcast
    • Photo Day
  • Business
  • Contact
    • Contact
    • Newsletter
    • QR Codes
    • FAQ
spacer

Blog - My Soapbox

» show all articles

spacer Subscribe to this blog using RSS | via email

Textexpander and YOURLS

spacer Here's another post that's not about photography. I promise, I'll stop talking about geeky infastructure as soon as finished testing my latest acquisition: a sensor loupe and a Sensor Klean .. errr.. sensor cleaner.

This post is about some more recent infrastructure changes though that I put the finishing touches on over the weekend. Did I mention last weekend I was super productive with both, fixing my iPhone and switching my calendar infrastructure? Oh, I have? Never mind.

I recently installed my own URL shortener. It helps me paste short links into Twitter or other short form communication, it lets me get some basic stats on these links, and in general I get a lot of fun out of dabbling with these sorts of things. If I can find the time for it. Luckily I didn't have to write my own solution, as there is YOURLS. And as I happened to own the tfttf.com domain, which is reasonably short, I thought "why not?" and went ahead. It works flawlessly.

The other tool that I wouldn't want to miss is Textexpander. It runs on the Mac and what it does is simple: it replaces short strings with longer ones as you type. So if I send out an email to someone in Germany, instead of copying/pasting the signature for that, I type siggg and Textexpander automatically replaces that with my full German email signature block. For the English signature I use sigge. To insert the current date I defined the shortcut ddate and so forth. A big time saver and totally transparent. Works system wide.

Textexpander can execute scripts too. And this is where the magic starts. It comes with a script to shorten URLs using bit.ly. All you do is copy a long URL into the clipboard (CMD-C) and then type /bitly at the place where you want the short URL to be pasted.

/bitly is the trigger for Textexpander to execute an Apple Script that takes whatever is in the clipboard, hand it to the bit.ly API for shortening and returns this to wherever the cursor was.

If you are as keyboard-focused as I am, this is bliss. (And believe me, I am keyboard-focused. I even use the jkhl keys in vi so I won't have to move over to the cursor keys and leave the 10-finger base position on the keyboard)

Long story short, I have adapted said AppleScript to run in conjunction with YOURLS and it works like a charm.

ยป download the script here (instructions inside)

And that's it. If you have YOURLS installed and use Textexpander, this ought to make your life quite a bit easier. It sure does that for me.

And please note: I'm not an Apple Script developer, this script is part of the Textexpander distribution (I hope I'm not gonna get into any trouble by posting it here in its modified form) and I merely adapted it ever so slightly for use with YOURLS. I will not be able to provide you with any scripting support whatsoever. Believe me, you really don't want me to give you scripting advice...

See Older Posts...
spacer

This is the place where I post my thoughts. Usually on photography. Not always though. Mostly in English, sometimes in German. I won't post regularly, but at least I'll try to be entertaining and relevant. Please consider subscribing to this blog. Subscription is free and it will help you stay up-to-date at all times.

spacer
Get updates to this blog
using RSS | via email

For more up-to-date information, see me on Google+

» Blog homepage






Latest Blog Entries




© 2010 Chris Marquardt   E-Mail Me
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.