Alfred Workflow - Upload most recent screenshot to Imgur

I needed an easy way to upload my last screenshot to Imgur. I have automatically uploading of screenshots to CloudApp but they preserve file names etc. I needed something that just takes my image and forgets that I sent it.

So, I created an Alfred Workflow to do this for me. The actual uploading is done by Bash Script Uploader. All I do is to find out where you keep your screenshots and take the newest one.

#!/bin/bash

DIR=$(defaults read com.apple.screencapture location)
FILE=$(ls -t "$DIR" | head -n 1)

CUR_DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)

#Upload
"$CUR_DIR/imgurbash.sh" "$DIR/$FILE"

The keywords to upload it are “ss to imgur“.

You can download it here >>