A Link Bundler Service for Bit.ly
I like link bundlers. They allow me to share multiple urls with people in a way that’s convenient for me and the person receiving them. My former standby was Linkbun.ch, but they’re getting old and I’m not sure how much longer it will be around. Bit.ly added Bundles back in 2010, and more recently added API access to them. I figured I’d give it a shot.
This Service is the result of the experiment. With a little configuration, it allows you to select any amount of text containing urls and click a button to create a Bit.ly bundle for simple sharing of as many links as you want, with just one url to send out.
Here’s a quick peek at how it works:
Installation and Configuration
The installation takes a bit of effort, but it’s not too bad.
You can install the Service by unzipping it and double-clicking the .workflow file. A dialog will pop up asking if you want to install it or open it in Automator. We want to open it in Automator first because we need to make a small edit.
Next, you need an API key.
- Set up a bit.ly account if you don’t have one
- Log in to your Bit.ly account
- Go to http://dev.bitly.com/my_apps.html
- Click “Manage my apps” and enter your password
- Copy the Generic Access Token
- Go back to the workflow open in Automator
- Scroll down to the first “Run Shell Script” action
Find the line at the top that looks like:
bitly_key = 'xxxxxxx'
- Paste your key between the single quotes and save
- Close the file, go back to where you opened it from and double click it again, this time choosing the “Install” option.
If you want to add a shortcut key for this, see my how-to, or get the Services Manager1.
Just select any text that contains full urls within it. Link Bundler will scan the text, pick out the links, and create a Bit.ly bundle for you. It will pop up a dialog at the end with your link, and offer to open it in your default browser.
It’s quite handy on its own, but also serves as an example for usage. Feel free to pick the main script apart (even though it’s a bit messy right now). You could add link shortening to the output link, which would also give you analytics on shared bundles. The API would also make it pretty easy to set up actual oAuth sign-in and build a table-based app for bundle creation and editing. Not sure how much use that would be, but for some reason it’s on my project list.
Link Bundler Service v1
Download Link Bundler Service v1
An OS X System Service that scans text for urls and creates a Bit.ly bundle from them
Updated 03/15/13. Changelog
I highly recommend the Services Manager if you get into using a lot of services. It gives you a much better idea of what came from where than System Preferences does, plus it has search and the ability to enable a service without putting it in the context menu. Swoon. ↩