dergachev / dropbox-screenshots

Improved automatic Dropbox upload of screenshots on OSX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dropbox-screenshots

OS X LaunchAgent and ruby script to have OSX screenshots automatically upload to Dropbox, with their public URL be copied to clipboard.

Dropbox.app recently added the same feature, but our approach is better:

  • clicking on notification opens the image in Preview.app, for easy annotations
  • the copied URL links directly to the image (rather than a landing page), which allows embedding images in markdown.
  • The generated image URL is renamed from Screen Shot 2013-11-01 at 3.10.13 PM.png to KDJSAJNN-2013.11.01-15.10.13.png which is shorter and harder to guess.
  • on retina displays, screenshots are automatically resized to 50%

This was only tested on OSX 10.9, though should also work with 10.8.

Installation

First, get your Dropbox user ID, as follows:

  • In Finder, right-click on any file under ~/Dropbox/Public
  • choose "Dropbox > Copy Public Link".
  • You'll have a link in your clipboard like http://dl.dropbox.com/u/12345678/mycoolpic.jpg
  • 12345678 is the user ID.

Having done this, simply run the following:

# install dependent terminal-notifier gem
which terminal-notifier || sudo gem install terminal-notifier

# get the code
git clone https://github.com/dergachev/dropbox-screenshots.git ~/code/dropbox-screenshots
cd ~/code/dropbox-screenshots

# run the installer (it will make your screenshots get saved to ~/Dropbox/Public/screenshots)
bash install.sh 12345678     # replace 12345678 with your dropbox user ID

TODO

  • Consider making a custom icon for notifications.
  • Investigate error in /var/log/system.log: Throttling respawn: Will start in 6 seconds. Related thread
  • Consider making a gem for ease of install.

Dev notes

PlistBuddy

About

Improved automatic Dropbox upload of screenshots on OSX


Languages

Language:Ruby 100.0%