I’m Paul Herron, a full-stack developer and technical manager.
I focus mainly on back-end development with tools like Symfony
and devops with tools like Docker

Uploading screenshots with Captured

by Paul Herron on 15 February 2014

Almost every time I take a screenshot, it’s because I want to show something to someone, and an ideal way to do this is to just paste them a link to the screenshot. To make life easy, I’m therefore happy for the default behaviour of my computer to be that if I take a screenshot, it automatically gets uploaded to the Web. Of course, there might be one time in a hundred where I’m capturing something sensitive, but as long as it’s not too painful to disable the uploading in these cases, I’m happy.

Many other people seem to like that workflow, and there are plenty of nice apps out there that attempt to solve this problem. On OSX there are options like Skitch, Jing and Upshot that all provide options along these lines.

Unfortunately I also throw some other requirements into the mix that really reduces the number of suitable apps. Here are the factors that, for me, need to be fulfilled to get the perfect screenshot setup:

With those requirements in mind, here are couple of different setups I’ve found to work well.

Honourable mention: Captured from the Mac App Store

Captured is a little menu-bar app that’s well worth buying. It provides a nice, simple interface with easily accessible options like enabling it and disabling it, and viewing your recent screenshots.

It’s a great app but, bearing in mind that big list of requirements above, I couldn’t quite get it to behave the way I wanted. It’s a really good option if you just want to upload to Imgur or Dropbox. In theory it can also support uploading to your own server, although I personally had problems getting it to authenticate properly with my server. Ultimately though I knew it wouldn’t support manual formatting of the screenshot’s filename, which is something I really wanted. So, it was on to a different option…

The (nearly) perfect solution: Captured, the open source version

Alongside its more visual and polished counterpart, Captured also exists in the form of an open source project, available on GitHub.

it is really intended for the commandline savvy

It’s a little more involved to set up but the trade-off is that, with a little configuration, it can hit all of the above requirements. If you follow the installation instructions you’ll end up with a configuration file at ~/.captured.yml, and into the end of that file I throw something like the following:

upload:
  type: eval
  command: |
    remote_name = 'screenshot_at_' + Time.now.strftime("%Y-%m-%d_%H%M%S") + '.png' 
    system "scp '#{file}' 'paulherron@paulherron.com:/home/paulherron/paulherron/_site/screenshots/#{remote_name}'"
  url: "http://paulherron.com/screenshots/"

The beauty here is that Captured is just running whatever commands you specify, so you have complete control over how it uploads and how it names things. With the above setup that means getting a URL back in the following format:

http://paulherron.com/screenshots/screenshot_at_2014-02-15_135029.png

The only minor disadvantage is that this version of Captured isn’t quite as integrated with the OS as the version from the app store is. You can’t quickly control settings via a menu icon for example, so managing the app is a case of doing things through the command line. So for example viewing your recent screenshots is a case of running:

captured --history

This works just fine for me though, and I’m pleased to have a screenshot app that works exactly as I want it to. Hopefully the above configuration could be useful to you too!

Back to homepage Back to blog listing

Next: