Web

You are currently browsing articles tagged Web.

A couple of days ago I wrote about how to use the UNIX CLI in Mac OS X to shorten a URL via bit.ly, while adding the URL to your link history in case you want to re-use it in the future. Now I’m going to take that information and show you how to further integrate this into your Mac’s environment using AppleScript and Automator.

The necessary glue here are these two facts:

  1. AppleScript can execute a shell script using do shell script; this is what allows us to leverage the curl command I discussed in the previous post from within AppleScript.
  2. Automator can execute AppleScripts via the Run AppleScript action. This allows us to take the AppleScript (which is executing the shell script) and embed it into an Automator workflow.

To give credit where credit is due, this isn’t my idea at all; I’ve derived all this information from this post by David Poindexter. His shell command is different and doesn’t populate the user’s link history, but it does work. Robert Huttinger also built his own workflow, which served as a basis for my own.

First, here’s the AppleScript code that wraps around the curl command to shorten the URL:

on run (input)
 
  set login to "YourUserNameHere" as string
  set apiKey to "YourAPIKeyHere" as string
  set input to (input as string)
 
  ignoring case
  if (((characters 1 thru 4 of input) as string) is not equal to "http") then
    beep
    return
  else
    set curlCmd to "curl --stderr /dev/null \"http://api.bit.ly/v3/shorten?login=" & login & "&apiKey=" & apiKey & "&longURL=" & input & "&format=txt\""
    set shortURL to (do shell script curlCmd)
    return shortURL
  end if
  end ignoring
 
end run

Be careful with the line starting “set curlCmd…”; it’s wrapped above and you’ll need to properly escape the quotes with backslashes, as above, in order for it to work properly. You’ll clearly want to replace “YourUserNameHere” and “YourAPIKeyHere” with the appropriate values from your bit.ly account.

A text version of the script is available for download here.

Once you have the AppleScript written, you can then embed it into an Automator workflow. I won’t bother to explain what Automator is or how it works here; there are numerous resources available to help in that regard. Rather, I’ll just simply say that you only need to assemble the Run AppleScript, (optionally) the Show Growl Notification, and the Copy to Clipboard actions as shown in this screenshot. In my case, I’m using Automator to create a service that accepts text from any application; this means I need only select the text of a URL I’d like to have shorten and then invoke this service. After a brief pause, a Growl notification pops up and the shortened bit.ly URL is on my clipboard, ready to be pasted into whatever application I need. And, since it’s now a Mac OS X Service, you can bind it to a hotkey for even easier access.

Again, credit goes to the others who have blazed this trail ahead of me; I’m merely posted my version here in the event it is useful to others. Comments, feedback, and suggestions are always welcome.

Tags: ,

I was experimenting tonight with some ways to add more automation to my workflow. One process that is (relatively) time-consuming is the process of generating short URLs via bit.ly. This site had a brief tutorial on how to use curl to do it, but the shortened link didn’t show up in my link history. Upon browsing the bit.ly API documentation, though, I was able to fairly quickly piece together a command line that will shorten a URL via bit.ly and put the shortened URL in the user’s link history.

Note that in order to use this command, you’ll need your bit.ly API key. Your API key is easily accessed from your account settings page.

Here’s the command I tested (works on Mac OS X 10.6.4):

curl 'http://api.bit.ly/v3/shorten?login=<bit.ly login>&apiKey=<bit.ly API key>&longURL=<Long URL to be shortened>&format=txt'

In order to make this truly usable, there are some additional things that have to happen. The long URL has to be properly encoded, as it can’t have any spaces or special characters, for example. But otherwise, this command is a workable solution to shortening a URL from the command line. All I need now is a small AppleScript around this and then I’ll have a URL shortening script I can bind to a hotkey. That should help speed the process up!

Tags: , ,

Revisiting Evernote

About two years ago, I took a look at Evernote (here’s the main Evernote web site), which at that time was still in beta. While I was intrigued with the idea of Evernote, at that time I struggled with getting data into Evernote. The Web Clipper didn’t seem intuitive to me, and I wrestled with how best to use Evernote within my fledgling productivity system.

Since that time, I settled on the use of OmniFocus for organizing commitments and Yojimbo for organizing information (more on how I use these two applications is found in this update on my Getting Things Done setup). Using AppleScript as the glue between the consumption, organization, and creation layers has been tremendously useful for me. While I still have plenty of room to grow and improve, I feel like the system I’ve built really helps me stay productive, in part because it’s transparent (i.e., it doesn’t get in my way).

When I first evaluated Evernote, I wasn’t too familiar with AppleScript and I believe that the Mac version of Evernote had very little or no AppleScript support. With recent releases of the Mac Evernote application, their AppleScript support has improved dramatically, and so I thought I should revisit Evernote. Now that I could use AppleScript to help ease the process of getting information into Evernote, perhaps it would be a good fit into my workflow. In addition, I’d gain the ability to have access to my notes from my Mac, my iPhone, my iPad, and any web browser. Just as OmniFocus is available from any of my devices, so too would my information be available.

I was right about the AppleScript part; I was able to relatively easily adapt the scripts I’d written for Yojimbo to work with Evernote. Combined with FastScripts, this made capturing a URL from Camino or NetNewsWire into Evernote as simple as pressing a hotkey. (If anyone is interested in the scripts themselves, let me know and I’ll make them available.)

Unfortunately, I now find that my system is no longer as transparent as it used to be. The system is now getting in my way. I’ll grant you that some of this could be due to the switch from Yojimbo to Evernote. It takes time to grow accustomed to any change, and this is no different. The question then becomes: is it worth the effort to sustain the change? What benefits will switching to Evernote get me, and what challenges will it introduce? I’ve done a little bit of thinking about this, and here’s where things stand currently:

  • First, everything in Evernote is a note. This means that I have to take extra steps to separate out different data types in the event that I need to view or act upon only certain data types. Yojimbo, on the other hand, has separate data types for notes, bookmarks, images, etc. Is this a big deal? Not a huge deal, but it does introduce a small amount of additional work if I stick with Evernote.
  • Second, Evernote’s UI is terribly clunky compared to Yojimbo’s. Anytime you do anything with tags, the Tags area in the left-hand pane of the Evernote window expands—even if you don’t want it to. Searching for items by tag means using Evernote’s extended search syntax, which is buried at the end of the user’s guide (you’ll need to use something like “tag:ToRead” to find all items tagged “ToRead”). Evernote lacks Tag Explorer-like functionality. There’s no Smart Collections (or Smart Folders) functionality in Evernote, although you can use saved searches; unfortunately, Evernote doesn’t provide a UI for creating saved searches. All in all, it makes working with Evernote more difficult than performing a comparable task in Yojimbo (in my opinion).
  • Third, for Evernote to treat everything as a note, it’s note functionality is surprisingly simplistic. If you use fonts and formatting in your Evernote notes, the iOS versions of Evernote can’t edit them. (To be fair, this is an Apple iOS limitation.) Even when I attempted to convert notes back to the equivalent of plain text using the Simplify Formatting command, some of the formatting remained, and there did not appear to be any way of correcting that behavior. Even more irritating, converting these notes back to plain text equivalent wasn’t detected as a change by the Evernote client, which meant that the updated note wasn’t synced up Evernote’s online service. In fact, unless I actually edited the note (for example, by adding a character and then removing the character), Evernote wouldn’t even save the changes to plain text equivalence.
  • Yojimbo lacks the ability to sync data across multiple platforms. Heck, Yojimbo is a Mac-only application—it doesn’t have apps for any other platforms, much less the ability to synchronize the data. Keeping data in sync across devices and platforms is, of course, one of Evernote’s key features. So, how much is the ability to sync and access data across multiple applications worth? How much of an advantage will this truly offer? I’ve seen the benefits of having my commitments available on multiple platforms via OmniFocus, and I’m seeing the benefits of keeping my RSS feed synchronized via Google Reader (using NetNewsWire on my Mac and NewsRack on my iPhone and iPad). Will the same benefit hold true for notes?

All things considered, it seems as if I’m finding one potential advantage to Evernote (syncing data across devices) and three known drawbacks (lack of multiple data types, note functionality issues, and an unintuitive user interface). I just can’t decide if having information like URLs and brief notes available across devices is really as worthwhile as it’s made out to be. I’d love to hear feedback from readers about their viewpoint—has Evernote syncing really been useful? Speak up in the comments below. Thanks!

Tags: , ,

No, I haven’t found it yet. Sorry, I hope I didn’t get your hopes up with that headline. I’ve been testing a bunch of different Mac clients for Twitter, and I just can’t seem to find the client that has the right mix of features. So, in the hopes that some of the developers of these various applications are reading, here are some of the applications I’ve tested and what I like about each one. Now I just need someone to take all these features and roll them into the perfect Mac Twitter client…

  • Lounge: The Mac beta of Lounge takes the cake for the most complete integration with Twitter. From within this application, you can view user details, see who’s following who and who’s being followed, view another user’s timeline, view Twitter search results, private messages, retweets, view the tweet in a Web browser, copy the tweet’s URL…well, you get the picture. So what’s wrong with Lounge? Primarily speed. I’d also appreciate the ability to customize the display a little bit more than I can currently. Granted, Lounge is still early (0.4.1) beta, so I guess we have to cut them a little bit of slack.
  • NatsuLion: NatsuLion feels the most Cocoa-native here, with full support for transparency (which is a feature I like). I can adjust the display quite extensively, and it has a minimal desktop footprint. There are some trade-offs for that minimal desktop footprint, though, and NatsuLion seems the most susceptible to Twitter brown-outs and outages. Sometimes it will just…not work.
  • Canary: This is a brand-new app I just found earlier today. My #1 complaint about Canary is the display of the tweets—it’s just awful. They need a more streamlined and dynamic display of the timeline, like Lounge and Nambu (see below). Otherwise, I absolutely love the solid integration with a variety of URL shorteners—including credentials for those URL shortening services. Right now, though, Canary is seriously buggy. Switching between views sometimes doesn’t work, and applying a filter then removing the filter causes problems as well. Again, this is an early beta (Beta 2), so I suppose some bugginess is to be expected.
  • Nambu: Nambu is supposed to be more than just a Twitter client, but in current builds only the Twitter functionality works. It’s a pretty decent client, fairly quick and responsive. I like that it automatically contacts URL shorteners to expand out the full URL; this lets you know where you’re headed before you click on it (a good thing these days given all the web exploits that are available). It’s supposed to offer integration with tr.im, a URL shortening service, but it doesn’t really work. It will shorten the URL but won’t use your credentials (in fact, it won’t even save your credentials between launches).
  • Twitterific: It wouldn’t be complete to talk about Twitter clients for the Mac without talking about Twitterific. The only thing I like about Twitterific is the AppleScript support. Otherwise, I absolutely cannot stand the user interface. I just don’t like it. Some people swear by it; it’s just not for me.
  • Bluebird: Bluebird is another application that’s just popped up in the last few days. The first time I tried it, it wouldn’t even launch (said that themes were missing); the second time I tried it, it worked. The themes are supposedly the big thing; you can use standard CSS/XHTML to style the appearance of the tweet timeline. Otherwise, it’s a very early build (Beta 1, I think) and it shows.
  • EventBox: I received a free build of EventBox from MacHeist, but I couldn’t get it to work. It would never even connect to Twitter.

So that’s where things stand. What would the perfect Mac Twitter client possess?

  • The extensive Twitter integration of Lounge
  • The smooth UI of NatsuLion blended with Lounge and Nambu
  • The URL shortening services integration of Canary
  • The AppleScript support of Twitterific

That would, in my opinion, create the perfect Mac Twitter client.

Tags: ,

I’d like to welcome our second sponsor, Hyper9! As you know, Hyper9 recently launched their flagship search-based administration product. I’m excited to be able to partner with them and I appreciate their sponsorship of the site.

If there are any other companies out there that may be interested in sponsoring the site, I have a few spots still remaining. Feel free to contact me if you want more information.

Tags: , , ,

Site Maintenance

The site will be going down for site maintenance on Monday, March 23, at approximately 11PM MST (GMT-7). The site could be unavailable for as much as 2 hours. According to my hosting company (Bluehost), the hardware on which the site is running is getting upgraded. We should see an improvement in performance as a result of the upgrade.

I apologize in advance for any inconvenience.

Tags: , ,

New Virtualization Wiki

Rynardt Spies of VirtualVCP hit me up via e-mail yesterday to let me know about a new virtualization wiki he’s launched. It’s called Vi-Pedia.

The idea behind Vi-Pedia is to gather information on virtualization technologies in one place for easier reference. Clearly, being a wiki it won’t succeed without lots of community participation, so I thought I’d put up a quick mention of the new site to help spread the word.

Free free to jump over to Vi-Pedia and help contribute!

Tags: ,

IT Knowledge Exchange

I’ve blogged for SearchVMware.com a couple of times, and their blog, Virtualization Pro, is hosted on IT Knowledge Exchange. It wasn’t until just recently that I noticed what IT Knowledge Exchange (ITKE) was really all about.

In addition to hosting a number of blogs—both editorial, which is where you’ll find Virtualization Pro, as well as by ITKE members—ITKE also hosts IT Answers. Got a technical question? Here’s the place to ask it. All sorts of people with all sorts of expertise are asking questions and answering questions here, which makes this a pretty good resource. If you’re familiar with the VMware Community Forums, this is similar (but not constrained to a single vendor’s products). If you’re pressed for time, like I am, then ITKE’s e-mail subscriptions and RSS feeds could be a big timesaver.

So, if you haven’t checked out ITKE, it might be worth your time to go have a look.

Tags: , ,

VMM Beta 1.5 is Here

Quickly following the initial beta release of Virtualization Manager Mobile (VMM), Schley Andrew Kutz has now released beta 1.5 of VMM. The updated beta, available via the relaunched lostcreations.com site, boasts several new features:

  • In addition to support for VMware Infrastructure 3 and VMware Server 2, VMM now supports Citrix XenServer 5.
  • VMM will now “gracefully degrade” on mobile devices that don’t have a fully AJAX-capable browser. This new Lite Mode extends VMM’s mobile support to include devices like a Blackberry or Windows Mobile phone.
  • Beta 1.5 adds a new feature called Accidental Touch Detection (ATD). ATD prevents users from accidentally powering off a VM by requiring an intentional touch, measured by a depression of at least 500 milliseconds. This feature will only be available in full mode, not the new Lite Mode.

The software will be free while it’s in beta, but licenses will be required upon release. Active beta participants will receive licenses in exchange for their participation. To find out more, or to see a more full list of features, visit the VMM site.

Tags: , , , , ,

Managing Information Flow

I’m picking up a thread started by Dave Graham, his brother Danny, and Stu Miniman regarding how they have organized their workspaces in order to help manage the flow of information. Here’s how I work.

Since my job has me both in and out of the office quite a bit, I’ve had to adapt most of my processes to work with only my MacBook Pro’s built-in display. While I do have a second monitor that I use when I’m actually at the office, I’ve grown quite accustomed to Exposé and the ability to quickly see all my windows (F9), only the windows for the application I’m currently using (F10), or quickly gain access to my desktop (F11). Unlike Danny, this “kool-aid drinking fan boy mactard” actually doesn’t mind the OS X UI in the least; in fact, I find that it tends to get out of my way the most. That’s not a slight against Linux or Windows; the OS is a tool, just like any other, and users need to use the right tool for them. For me, the OS X UI makes sense and works well. Your mileage may vary, of course.

I don’t use Spaces, the Mac’s virtual desktop functionality, because…well, it’s awful. Besides, having gotten so accustomed to being able to quickly and easily navigate windows I’ve found that I don’t need the extra desktops. I used to be a huge virtual desktops fan (just read some old entries here in the Macintosh category), but after getting the hang of using Exposé I just can’t get back into using virtual desktops.

Anyway, enough of that. In my efforts to manage the daily information flows, I use a few key applications:

  • Apple Mail with MailTags and Mail Act-On: The combination of Apple Mail with MailTags and Mail Act-On allows me to quickly and easily process e-mail messages by tagging them and filing them with only a few keystrokes. In early 2008 I resolved to keep my Inbox empty, and these tools have been a key part of actually managing to do that.
  • NetNewsWire: NNW manages all my RSS feed subscriptions. When I review new items in NNW, I only superficially scan the headlines across all the subscriptions. Items that look like they are worth a deeper investigation get added to my OmniFocus inbox for reading later. I currently don’t track any Twitter searches via RSS, but that may change later. We’ll see.
  • OmniFocus: I use OF to manage all my obligations. Anything that takes more than a couple of minutes to handle gets dumped into OF for processing later. A couple of AppleScripts automate the process of getting items into OF from NNW (via a Quicksilver trigger) and from Apple Mail into OF (via Mail Act-On). This allows me to quickly and easily process only two inboxes—my e-mail inbox and my RSS inbox—and track everything inside OmniFocus. I also keep OF on my Mac synchronized with OmniFocus on my iPhone.
  • For Twitter, I’m using a program called NatsuLion, which also has a matching iPhone application. I may dump this for another application, as I’m looking now for an easier (read: more automated) way to share more information via Twitter. It would be great to be able to use an AppleScriptable Twitter client to which I could push an NNW headline, for example.

Along with those applications, I typically have several Remote Desktop sessions, a number of browser windows, iCal, my blogging client, TextMate, and Office 2008 running at any given moment. Between this core group of applications, I find that I’m able to manage—and sometimes rise above—the information deluge.

Tags: , , , ,

« Older entries