schussman.com logo

Using Alfred to manage tasks

Recent updates to Alfred (my earlier post here) have greatly enhanced its capabilities to run local scripts and extensions. I’ve long used the Journal Tasks TextMate bundle in conjunction with geektool to manage and display a small to-do list in one corner of my OS X desktop, and now with Alfred I can instantly add items to that list. Quite slick.

Here’s the task list viewed in TextMate: Simple and no frills.

quick list textmate

And geektool displays it on the desktop using a bit of awk:

awk '!/@done/' ~/DropBox/SimpleText/Quick\ List.taskpaper

quick list desktop

I’ve set up an Alfred extension to add to the list using the “do” command:

alfred quicklist

The command in Alfred looks like this:

perl -p -i -e 's/^Quick List:\n/Quick List:\n\n- {query}/' ~/Dropbox/SimpleText/Quick\ List.taskpaper; growlnotify -m "Added item to quicklist"

It finds the header for the appropriate part of the list, and inserts the query passed to it at the top of the list. (Update paths as appropriate; I keep my quick list file in my DropBox folder.)

Growl provides a nice visual confirmation that the item has been added. I still have to open the file in TextMate to mark items as @done and periodically expunge completed items, but it’s great to be able to effortlessly add to the list.

The entire Alfred extension is at github.

Alfred is my favorite new launcher

Back in the day, Quicksilver was the hot app for OS X. I hadnít used it for years, now; at some point it seemed to become unstable, and its indexing sucked up a fair amount of CPU. So until recently Iíve been launcher-less on my Macs. Oh I checked out the occasional alternative like Launchbar, but never took to it.

But now Iím using Alfred and seeing the launcher light once again.

Alfred is nicely capable on its own: Invoke it, type an application or file name, and Alfred displays the matches, each with a hotkey to activate. But with its Powerpack, it gets just fantastic, with dedicated shortcut keys to active popup finder navigation, a mini iTunes player and a Clipboard history. The keyboard shortcuts continue ó each popup gives hotkeys to the options it presents.

These tools have replaced my normal modes of navigating on the MacBook. Itís so easy to invoke any of the powerpack features to find and email a file, fire up a playlist, or simply launch/switch applications. What I used to do with quicksilver, Iím now doing with Alfred, and loving it.

[The launcher app itself is free and available on the Mac App Store; the powerpack, which turns up the capability to 11, costs about $20. Worth it.]

November updates and &c.

First things first, our little boy is a bundle of joy. At fifteen weeks, he’s grinning up a storm, making lots of not-quite-talking sounds, and getting closer to rolling over every day. And now we have his very first refrigerator art:

Art on the fridge

What else to mention, note and otherwise jot?

  • Gruber sneers at the suggestion that Android phones will soon find a place on the flickr popular cameras list, and he’s right. Data point: Some photos I upload from my Droid X are identified by the application that took the photo, not by the device itself; for example, the photo linked above says it was taken with “a Vignette for Android.” I bet that iOS devices/apps don’t do that, do they? It’s hard to demonstrate any kind of presence with that sort of fractured reporting.
  • That said, I’m finding that my Droid X is a fully capable device, enabling easy photography and video, and casual easy-to-maintain connections with friends and family. This internet over-the-air thing could go places, folks. However, Motorola, I’m looking at you: The glitch where you incorrectly remove spaces after alpha characters when I use puncutation like $ or " has got to get fixed. It makes sense for commas, periods, colons and semicolons, but not most other marks.
  • Also, Steambirds is great on Android and iOS, too.
  • I got myself one of those about.me jobbers. I don’t really know what to do with it.
  • Relatedly, What do do with an old blog? That’s what I’ve been wondering, lately. This little domain has served as a web log now for nine years, and though I’ve tinkered with the flash and easy posting of tumblr and posterous (and twitter and github and so forth) I’ve never quite decided if and how to shift gears to one of them, you know, officially. Something to consider as this little corner of the twinglywebs has another birthday.
  • We ditched DirecTV back in July to go all-online for our TV needs and have been pretty happy with the switch. We miss the easy-on of live TV sometimes (news, some sports) but Netflix and Amazon on Demand have treated us pretty well. The video quality of Netflix isn’t as good on the Wii as on the Blu-Ray player, but the little white box makes up for it by beating the pants off the Sony when it comes to interface. Catch up, Sony; little image tiles and no discoverability are losers, man.
  • An evening of tinkering with AirPlay in iOS 4.2 (via the iPad and my now five-year old and perfectly working Airport Express hooked up to the Model One) really does make me want AppleTV and -enabled speakers all over the place. It’s cool, and it so lightens the comparable overhead of MacBook + Remote app. P.S., Tivoli, I would pay real money for an Airplay-enabled model.
  • The TSA urges us all not to make things inconvenient this holiday season? “TSA: You can be sure the SA doesn’t stand for self-aware.”

Happy Thanksgiving from all of me to both of you.

Replacing Edit in TextMate with QuickCursor

After upgrading to Snow Leopard on my MacBook, I found that the Edit in TextMate hook wasn’t working. There were a few threads about re-enabling it, but nothing definitive, and the support page suggests either running any target applications (those in which you want to use Edit in TextMate) in 32-bit mode, or perhaps trying some uninstall-reinstall voodoo. Since neither of these were ideal, I thought I’d try the “last-resort” suggestion, QuickCursor.

After a few minutes of use, QuickCursor seems to me to be a great improvement over Edit in TextMate — far from an “if everything fails” option, I prefer it for most of my uses.

  1. Installation is easy. Download, copy to Applications folder, and run it.
  2. Configure: I set it to load on bootup, and it automatically found TextMate as one of my editor options. I assigned TextMate the same keyboard shortcut that Edit in TextMate once occupied (cmd-ctrl-E).
  3. Use! From a Safari field, hit the shortcut and up pops a TextMate window; edit away, save, and your text appears in the Safari field. So far, just like Edit in TextMate, with the added bonus of being uncomplicated and functional in Snow Leopard. But here’s where it improves on the original: Edit in TextMate required the “target” window to be in focus in the target application; that is, when using Safari with multiple tabs open, the tab with the target “edit in” field had to be the active tab. This meant that if you opened an “edit in” TextMate window, then flipped through a few tabs to find something, you would have to relocate the target tab before being able to save from the TextMate window. QuickCursor doesn’t have this limitation: You can open multiple editing windows from multiple tabs, edit any/all of them, and save your edits without worrying about which application or tab is in the foreground. Bingo!

There are a couple of important caveats to QuickCursor that may make it not an ideal solution for some users (my bolds):

QuickCursor depends on two technolgies. For reading/writing data from the original application is uses the accessibility api. The nice thing about that API is that it’s not a hack, it’s a supported API. But unfortunatly not all views support the accessibility api (at least not read/write of the text content). And in particular webkit views don’t support it. And that means that tools that use webkit as their editor (such as Mail.app) won’t work with QuickCursor.

That means that Firefox doesn’t work with QuickCursor, either, since it doesn’t use the accessibility API. Since I’m a Safari user, and never much used Edit in TextMate for Mail, QuickCursor is pretty spot-on ideal for me.

Good Apps: 1Password

1Password is a password manager for OSX that performs smart form completion in your web browser. In the not-quite-a-year since I bought it, I’ve used it, in one way or another, just about every day. To make a long story short, it’s made simple, easy work of everything I do that involves a web password, login, or account information. And in that year, the software has only become more capable, adding increasingly simple syncing and great support for iPod/iPhone.

In a nutshell, here’s what 1Password does: It pays attention to the web forms you fill out — the login at the power company, for example — and, if you give the word, saves the information you enter into that form to a password-protected keychain (it knows when you’re filling out a new form, and prompts you for the okay to save it). Later, when you return to that form, logging in is as simple as a quick tap of a keyboard command: hit cmd-\ and 1Password fills in and submits the form, and boom there you are looking at your power bill, without any looking up your account number or anything.

I’m not using the power bill example for nothing. Paying bills is where, for me, the huge payoff of this app is: By removing all the overhead of looking up logins (finding the last bill for the account number or something), 1Password has massively reduced the overhead of managing my bills. See, it doesn’t just save your logins, it keeps a list that helps you to manage them. From that list it’s two clicks to select and log in to any given form, so checking all my statements, bills, and accounts is a simple matter of scrolling through the list and opening up any accounts that I think I might need to check. To check my credit card, for example, I used to have to pull out the card and type in the number, which inevitably took place on a sunday morning in the wintertime when I’m wearing my slippers and it’s snowing. The mental process was something like, “where’s my wallet? Oh, the briefcase. Wait, it’s still in the car. And the car is in the driveway with six inches of snow on it. I’ll do that later.”

And now? I skim the list in 1Password, click the name and then click the web form login to check my balance, make a payment — for every single bill or account I have. It’s too easy, so I just check in that Verizon bill any time I wonder how I’m doing. And about every three weeks I just run down the list and check all the accounts that involve money. Honestly, it’s awesome.

And of course it handles all those logins for social networking, webmail, my usermin control panel, mailing lists, and so forth. In fact, I let 1Password store just about every single login I have; when it’s so easy to save with the app, why take up any mental space with keeping a login that might be a one-off, after all? And beyond passwords, it keeps all kinds of other information, making it able to smartly fill in things like credit card payment forms. Further, it saves other “wallet” items (like passport numbers) and “smart notes” (ssh passwords).

With the mobile 1Password app for iPhone/iPod Touch, all of this information is accessible on the go. Agile built a web browser that’s highly — but not perfectly — functional for most uses, and it lives inside the app where it accesses your login information directly. Previously, Agile had built a wonky workaround to make that information accessible via a Mobile Safari bookmarklet that synced via Safari bookmarks to the iPod/iPhone. I have to admit that I’m still pretty fond of this approach, and although 1Password doesn’t update the bookmarklet any longer (removed for security reasons?), they can pry that bookmarklet from my cold dead hands. For one thing, Wells Fargo doesn’t like their browser one bit, recommending that I install Safari for Panther instead.

Multiple Macs? 1Password can deal. Just sync your 1Password keychain (either the OSX keychain or the new “Agile Keychain” format) and you’re good to go. For the past ten months, I used Unison to handle this syncing, but just recently switched to Dropbox, and it works like a charm to keep everything updated on both my current machines.

Finally (I know, I know), the single time I’ve needed to contact the folks at Agile for some tech support, they were on the issue promptly and responded personally. Nice.

What doesn’t 1Password do? It’s a short list. Logins for some sites — for my account with ING, and my mortgage account, for example — just elude its ability to detect and autocomplete. So it’s not perfect on that score, but it’s awfully good. Update Oct 25: Thanks to Carl at Agile Web Solutions, I have an answer to at least one of those tricky sites. Thanks, Carl! And I would love if it were capable of filling in items in Terminal, like those ssh passwords, but I think the devs have wisely focused on making it speak smartly to web browsers instead of a longer list of apps.

So. 1Password is really, really good stuff. Check it out.

Dealing with duplicate keywords in Lightroom 2

I’ve noted recently how slick it is to be able to use nested keywords in Lightroom: It’s a piece of cake to select a set of photos, hit cmd-K, and enter “mount humphries > mountains” to assign the “mount humphries” as a child keyword of “mountains”.

However, as noted by a poster to a thread about keywording over on the Flickr Lightroom group, this creates a potential problem: If the child keyword is already used, Lightroom 2 will end up creating a duplicate keyword; you’ll end up with one “mount humphries” without a parent, and one “mount humphries” keyword with the parent of “mountains.” So, by trying to be hierarchical with your keywording, you’ve actually splintered your keywords. Not helpful!

Having already found a fun way to explore relationships between and frequencies of my keywords, it occurred to me that I might have some ready-made tools to help with this situation: The need to find and deal with duplicate keywords.

As this article became more popular, I worked through a couple of alternative methods and organized things a bit further. To date, I describe three methods of identifying duplicate keywords:

  • Full auto: Requires some scripting but is the most expedient way to go about it (and my favorite).
  • Semi-auto: Requires the awk tool to identify duplicates but doesn’t rely on any sqlite3 code to pull from the LR database.
  • Full manual: Uses LR’s built-in export tool and MS Excel to get what you want. Lots of steps, but it works.

After finding your preferred method, read on to see what to do with all the duplicates you identify.

The full auto/scripted method

Thanks to Dieter for putting me on to a much quicker, straightforward way to identify duplicates using SQLite only — no awk:

select count(name) as num, name from AgLibraryKeyword group by name having num > 1

I’ve kept the original SQLite+awk method below for posterity:

First I needed to find any duplicates created — potentially — by the ad-hoc nesting of keywords. A quick modification to my keyword frequency script produces a list of dupes:

# display a list of duplicate keywords in Lightroom 2 cp ~/Pictures/Lightroom/Lightroom\ 2\ Catalog.lrcat ~/lightroom.lrdb /usr/local/bin/sqlite3 -csv ~/lightroom.lrdb 'select ImageCountCache, name from AgLibraryKeyword;' > /Users/alan/lr-keywords.csv awk -F , '{print $2}' lr-keywords.csv | sort -n | uniq -d rm ~/lightroom.lrdb rm ~/lr-keywords.csv

As with the frequencies, this short script makes a backup copy of my Lightroom 2 database, then calls on sqlite3 to extract the list of keywords; the difference is in the 4th line, where I use awk to pull out the tags and then pipe them through two built-in unix functions to print a list of any duplicates. In my case, it yielded the following:

Running the duplicate keyword script

Perfect! A list of keywords that appear to be duplicates.

Note: The script above works with OS X Tiger and requires an upgrade to the default version sqlite. It ought to work with Leopard as long as sqlite is present. Windows? Don’t know; either via cygwin or separate binaries, awk and uniq should be available for Windows, and there is a sqlite for Windows download at the above link.

Skipping the sqlite step

Update 17/Dec/2008: If you’re not eager to delve into sqlite, you can still make this work, but you’ll still need to have the awk tool. OS X users, you should be good to go, since awk comes with the OS; Windows users, you can download awk for Windows. First, manually export your keywords list from your catalog: Metadata > Export Keywords…, and save the file as lrkeywords.txt, and then run the following one-liner script from a shell/terminal:

awk 'BEGIN {FS = " "}; {$2 = $2; if (match($0, /{/)0) print}’ lrkeywords.txt | sort -n | uniq -d

Just as in the sqlite version, this one-liner parses your keywords file and returns the list of keywords that appear more than once and are not identified as synonyms. You can then reconcile the duplicates as described above. I prefer the single-step version that extracts directly from the database, but hope this is useful to a few folks.

The Full Manual Process

If you’re averse to both the sql steps and to using awk, you can use MS Excel to identify the duplicates. I think it’s far more cumbersome than either of the above processes, but it works. Here goes:

Manually export your keywords from Lightroom: Metadata > Export Keywords ….

Open that export file in Excel: Open as a text delimited file, but uncheck all the delimiters; you don’t want excel to parse along spaces or tabs, since both of those characters appear in the file but not as record separators.

You should see a single column of keywords something like this:

screenshot

We need to slightly clean up that column to remove leading whitespace. We’ll use the CLEAN function to do that: In the column next to your keywords column, enter the formula =clean(a1), and then drag that formula all the way down the keywords column.

screenshot

In col B, you now have a whitespace-trimmed set of keywords, but because of the clean() formula, you can’t manipulate it further. Select that entire column, copy it, and then use paste special to paste the column as values into column C.

screenshot - cleaning up keywords list with paste special

Now we’re ready for the final steps: Sort, flag, and filter. Select column C, then go to Data > Sort, and sort ascending by column C. Now, in column D, drag the following formula from the first row to the last: =IF(C2=C1, "!", "").

screenshot - applying the duplicate flag formula to the sorted list

That just fills the column with a flag if column C has a duplicate. It’s a low-budget search, but it works as long as the list of keywords is sorted. Finally, use Data > Filter > Autofilter, and click-select the ! in column D. You’ll now have a filtered list of duplicates from your original keyword list, which you can resolve as described above. Note that you’ll have a number of keywords surrounded by {} or [] brackets; these are keywords entered as synonyms or categories, and you should ignore them when you are addressing duplicates.

screenshot - the list of filtered duplicate keywords

You can see from my current duplicate list that I’ve been working heavily on food-related keywords as we cruise through the holiday season.

All told, that whole manual process should just take a couple of minutes once you have the steps sorted out. Because the steps are manual, it’s not as easily-repeatable as the automated sqlite+awk approach, but it does work. I hope someone finds it useful!

Dealing with the duplicates

Whatever method you’ve employed, at this point you have a list now — let’s check out if it means what I think it means. Switching back over to Lightroom, I can filter for all photos with the “mount humphries” keyword:

Lightroom listing duplicate keywords

Sure enough, I have 12 images tagged with “mount humphries”, and 11 images with the same tag set as a child of “mountains” (as an aside, I see that I have well over a hundred images with the “mountains” tag that could probably use some more granular tagging).

My first impulse was to try to just drag the non-child “mount humphries” into the “mountains” tag; this works, after all, with other keywords. But in this case, it won’t do the trick, presumably because there is already a “mount humphries” keyword there — Lightroom won’t let me add a same-named child.

To reassign the keyword to the parent, you need to take a few more steps: First, click the right-pointed arrow to the right side of the duplicate, non-child keyword; this will navigate to all images assigned that keyword. Then, in the grid view, simply select all (cmd-A), and then check the child keyword to add it to all of the selected images (the checkbox is to the left of the keyword, and appears when the mouse cursor hovers over the keyword), and you’ll see the count increase accordingly. Next, un-check the duplicate, non-child keyword in the keywords panel. You’ll see its count drop to 0. The order of those two check-uncheck steps is important: If you uncheck the non-child keyword first, you’ll end up with an empty selection and nothing to apply the proper keyword to.

Lightroom displaying duplicate keywords unchecked

There! My “mount humphries” keyword as a child of “mountains” is now assigned to all 23 original images, and I can delete the duplicate, non-child tag.

So, with an approach like this, ad-hoc keyword nesting shouldn’t be feared: We can identify duplicates created by nesting, and, in a matter of seconds, apply the same nesting to any previously-tagged images. And, once you’ve resolved the duplicate, any further assignment of the focal keyword will always assign it, appropriately, as a nested tag. Pretty slick, I do say.

Good Apps: Instapaper

It only took a few minutes with the free version of Instapaper on the iPod to make it quite clear that this is one app worth paying for.

Marco Arment sums up the app better than I can:

Instapaper facilitates easy reading of long text content.

We discover web content throughout the day, and sometimes, we donít have time to read long articles right when we find them.

Instapaper allows you to easily save them for later, when you do have time, so you donít just forget about them or skim through them.

Simply and straightforwardly, Instapaper works in conjunction with a simple web interface to download articles or blog posts — or anything else that the handy bookmarklet can save — to your iPhone/iPod Touch, making them available offline for reading whenever the time and mood strikes.

Unlike altogether too many App Store applications, Marco offers a free version of Instapaper along-side the “Pro” version, which means that it’s easy to test out the app without making a commitment. Before a trip to Dallas a few weeks ago, I downloaded the full-featured free version and loaded it up with maybe a dozen long-ish blog posts and some other things I have been meaning to read. This process is about as simple as it gets: Click the “Read Later” bookmarklet to save any article to your Instapaper account, and then sync the Instapaper app to that account. The app will download both web- and text-only versions of the article and save them to the iPod. Later, on the plane or between meetings at that wifi-unfriendly hotel lounge, just open up Instapaper and there you find the articles:

instapaper screenshot

Open one up and read away. (Instapaper Pro even saves your position so you can come and go from long articles easily)

instapaper screenshot

Since it’s a bookmarklet, you can sync Mobile Safari on your Pod/Phone and flag things for later reading while you’re on the go, as well. And since the backend of Instapaper provides a web service, you can also read and manage all those articles from any web browser.

The Pro version does have some nice added features that are worth the $10 purchase price. But what makes Instapaper truly worth the money is that the developer has, in my mind, made precisely the kind of app that’s worth supporting.

Photography: Hitchhiker's Guide to Lightroom

I spend a lot of time in Lightroom 2 these days. I’m nobody’s pro, but I shoot a lot of photos, and after having used Lightroom (and now Lightroom 2) for a while now, I think I have a pretty good, simple, enthusiast-style workflow sorted out. I’ll summarize the workflow itself (importing through working up images) in follow-up post. Here are a few general tips that seem to work well for me:

Essentials, or Stuff I use constantly: I use Picks and keywords extensively. Reviewing newly-imported photos, I mark anything that I like right off the bat as a Pick by simply hitting shift-P as I scan through the gallery (and shift-X to immediately mark others as rejects; the shift modifier will mark the current photo and move on to the next shot). As I revisit a set of shots later, I find myself repeating this process; while those subsequent passes primarily identify further Rejects, I do occasionally find more Picks after starting to work up other photos. After each pass through a gallery, I use cmd-DELETE to remove (and delete) all the Rejects.

This has been a nice insight for my process: It means that I am fairly conservative when it comes to Rejects. That is, I don’t mark as Rejected 1) unless a photo is obviously bad (bad focus, blur, composition I really dislike, etc.) OR 2) until I’ve spent some time on photos in a set that I do like right from the get-go. This frequently helps give me a sense for appealing qualities of photos that I might not have noticed or thought of initially.

With a gallery through at least a first pass of identifying Picks and Rejects, I apply keywords. As with many aspects of processing photos, Lightroom has lots of ways to do this. There’s a jobber called Keyword Painting that I don’t use, because it’s always been much faster to simply select sets of photos and then apply keywords to the selection. In Lightroom 2, cmd-K focuses on the keyword entry box, which will auto-complete as you type. Lightroom 2 also has “recommended keywords” functionality, so that as keywords are assigned to a photo or set of photos, a new set of co-occurring keywords is identified and displayed for easy additional assignment.

Although I like to use a large-ish image preview (hit = to increase the size of preview images in the gallery grid) for screening for Picks and Rejects, for keywords I like to shrink the grid size (keyboard shortcut -). This fits more images into the grid and allows me to select larger sets for group assignment of keywords.

Lightroom allows for keywords to be nested, and there’s a great shortcut for accomplishing this: When entering keywords, separate child from parent keywords with a > sign: flickers > birds, for example, or burgers > food.

Simplifying, or Things I don’t use in Lightroom: Beyond keywording, Lightroom has at least a trio of way to identify and categorize photos: You can flag photos as Picks, label them with colors, and rate them with zero through five stars. I don’t use colors or stars at all. They may be highly useful for some situations, but they just clutter the cognitive space where I think about my photos: “Is this a three-star green photo, or a four-star blue one?” So except in the rarest circumstances, I haven’t yet found a use for ratings and color labels.

Indispensable keyboard shortcuts: There are grundles of these, but the shortcuts I use all the time are:

  • G, E, D: Gallery, Editor, and Develop modes
  • P: Mark as Pick (modify with shift)
  • X: Mark as Reject (modify with shift)
  • cmd-delete: Remove Rejects (optionally delete from disk)
  • cmd-K: Assign keywords
  • W: Jump to White Balance selector in Develop mode
  • R: Crop tool in Develop mode
  • J: Show clipped darks and highlights (Developer only; in gallery, changes display of thumbnails)
  • L: Cycle the lights (view on black)
  • tab/shift-tab: reveal/hide menu panels

Next time: The library filter, file organization, workflow, and Lightroom+Flickr?

New-to-me Spotlight feature

I’ve spent the last several days digging information out of a set of files, essentially coding variables from a large group of archives. Previously, I’d only used Spotlight occasionally, but for this kind of data digging, Spotlight really, well, shines. Calling up Spotlight and telling it what I’m looking for brings up a short list of relevant files. That’s not new, but what was new to me is what Spotlight does next: When the file is opened, simply hitting CMD-G (for Find Again; works great in text files, Safari, Firefox, Mail) takes me right to the correct section within the file. This won’t work so well if the search string appears lots of times in the file, but if the file is a long list of mostly-unique records, it works great. I’ve used Spotlight’s similar ability to navigate directly to a reference in a PDF, but this was new to me, and slick. Even when the right document is already open, it often is far easier to invoke Spotlight and enter the search terms than to switch to the right application (which often means find in a long list of apps) from where I’m entering variables. All day long, it’s like Spotlight is reading my mind.


About, the short version

I’m a sociologist-errant. This site is powered by Textpattern, Pair Networks and the sociological imagination. For more about me and this site, see the long version.

RSS feed