Alfred/Hazel Workflow for Screen Capture

If you take a lot of screenshots on a Mac like me, you probably have a good workflow for doing it using something like LittleSnapper/Ember, Awesome Screenshot or Skitch. The biggest problem I've had is that after I take a screenshot, I often want to do something with it. I can do this by just getting Cloud to watch and upload files passively, but I've always wanted to save to my own server after just issuing one command to capture the page.

I love Alfred. Launchers like Quicksilver and Alfred are what I think of as the best minimal UI apps that I use on the Mac. I finally got around to searching for a way to capture a full scrolling screen from it and do something with the output.

I found an excellent Alfred workflow by user moom on the Alfred Forum that uses a shell script to run Webkit2Png in the background. It's awesome. I just copy the URL of the page I'm on, summon Alfred with a few keystrokes, and then it gets captured, optimized, and uploaded to my server in the background. I made a video of the workflow showing Alfred, Hazel, ImageOptim, and Transmit working together with lots of spit and chewing gum in case anyone else has this need.

It's a lot of steps to set up, but if you have this need, you'll appreciate it. ;) You can modify the steps for your workflow to move it to note in Evernote, to Cloud, or wherever your heart desires. Download the workflow here.

If you're interested to know how I modified the workflow, these are the options I used:

python webkit2png -F -W 980 --delay=5 "$(pbpaste)"
ls *.png | grep -v icon.png |
xargs -I {} mv {} ${HOME}/Sites/media.konigi.com/snaps/2013/

-F -W 980 outputs a full scrolling screen at 980px wide. You can see what the options are by running this command in the terminal: webkit2png --help.