The Hidden Blog

As it turns out, I do have a hostname.

ScreenUpload: Automatically upload screenshots with scp

Published on November 6, 2014

notification

There are a lot of scripts and applications out there acomplishing the same task, most of them are probably more polished than what I came up with, but there was always something missing which made me switch back to some old unmaintained PrefPane called “ScreenGrab”.

Unfortunately it was FTP only and I wasn’t really keen on running an ftpd on my server any more.

My requirements were (and still are):

  • Simple and lightweight
  • Retina ready
  • Using the default Mac OS screenshot shortcuts
  • Moving screenshots from the default location (Desktop) to a specified directory or deleting them after a successful upload
  • sFTP / SCP upload using public keys located in ~/.ssh
  • Uploading to my own server, no third party service
  • Editing features are not needed
  • Keep history of past uploads
  • Direct link in clipboard (https://example.com/example.png)
  • A long and not easy to guess unique filename.

Like the comment in that thread suggests most of this would be possible with Automator but where’s the fun in that.

I don’t know what took me that long but I wrote a simple tool powered by Node.JS doing just that.

ScreenUpload

Grab it here: ScreenUpload

In the future I’m planning on adding a simple web interface running on the remote server which should make it easier to delete screenshots, search for screenshots from a specific time range or just browse the archive. Another neat feature would be drag-to-upload on the web interface.