Talk/Chat/Twitter Like a Pirate
I previously described how to use Ruby and Automator to build a custom Mac OS X service. Today, in celebration of International Talk Like a Pirate Day, I present a quick-n-dirty text Pirate-ization service for Mac OS X Snow Leopard:
Before we start, you will need to install the Booty Ruby gem into your system's default gem repository. If you haven't installed a custom version of Ruby, go ahead and follow the instructions in the Booty readme. Otherwise, make sure you execute commands using "/usr/bin/gem".
If you have no clue what I'm talking about, just open a Terminal window and type the following (one line at a time):
gem sources -a http://gems.github.com
sudo gem install mdeering-booty
Now to create our service. Launch Automator and select the "Service" template. Be sure to enable the "replaces selected text' option:
Next, as before, add the "Run Shell Script" action to your workflow and select "/usr/bin/ruby" as your shell. Then enter the following code into the shell script text box:
Lastly, save your new service (I called mine 'Pirate-ize!') and give it a try: select some editable text (in Safari, TextEdit, iChat, even your favorite Twitter client), then right-click the text & select 'Pirate-ize!'. Your selected text should be replaced with appropriately piratey prose. Remember, you can set a custom keyboard shortcut for your Pirate-ize service in 'System Preferences -> Keyboard -> Keyboard Shortcuts'.
Now get to talkin' piratey ya lubber!
[If you don't feel like creating this service from scratch, you can download this zip and place the resulting Automator workflow in your ~/Library/Services folder. You will still need to install the Booty Ruby gem.]


Comments [0]