Simple script to taking drag-n-drop screenshots on OSX and upload them to your own server.
- First create a new bash script with the following content:
#!/bin/bash
# Use timestamp to generate "unique" filename
filename=$(date +%s).png
local_path=~/Desktop/$filename
# Open screencapture application
# -s flag means drag-n-drop mode
screencapture -s $local_path
# Upload through scp
scp $local_path YOUR_SERVER_HOST:/path/on/vps
# Remove temporary local file
rm $local_path
# Copy url into cliboard
echo "https://your.domain.org/$filename" | pbcopy
- Follow this guide to setup a new service+keyboard shortcut for the above script; http://web.onassar.com/blog/2012/06/30/osx-bash-script-execution-through-keyboard-shortcut/