Getting started with hacking up Alfred workflows
One thing I do an awful log at work is deal with error numbers frown at me by the operating system. These generally are as annoying to us developers as they are to users – what does error 35 mean when I try deleting that resource? For ages I’ve wanted to make a quick way to help me look them up POSIX errno values, and finally on this bank holiday weekend I found time.
I’m a heavy user of Alfred, an app for the Mac where in response to a key press I get a text field into which I can type app names or files or google searches and have them carried out. It is literally one of the first things I install on any Mac I use. Given this is my go to for most actions, I thought I’d try teaching Alfred to report back error, like so:
The main thing that’s delayed me doing this is that although is very scriptable, the documentation isn’t that good, and leads to “go look in the forums”, and I generally don’t have time for that. Thankfully, other people out there have stepped up to the plate. I wanted to write my little tool in python, and thankfully Dean Jackson has both provided a very nice python library for talking to Alfred and also some great documentation on how to use it.
Thus over coffee this afternoon I was able to quickly knock up a very simple Alfred workflow that did just what I wanted. If you happen to have a similar esoteric need you can either grab the source or grab the compiled workflow.
Overall it’s a absolutely trivial amount of work, but getting here has taken me ages due to lack of time to site down and learn how to do it. Now I’ve started I’ll probably write a lot more, but getting over the activation energy to get started is very hard to justify when you’re already on a tight deadline. I wonder how many other tools I use day to day I could unlock properly if I had time and the tools themselves had more accessible documentation.
- Next: The modern, the extreme, and the classic
- Previous: Who's looking after your digital rights?
- Tags: Alfred, Geek, Mac