Created
March 29, 2010 19:34
-
-
Save jduckles/348303 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Streamlined workflow for capturing screen shots and uploading them to my website. | |
# Assumption: you have keypairs set up for ssh with the target HOST | |
read -p"Enter filename (no extension): " NAME | |
HOST=jduck.net | |
DIRECTORY=www/files | |
REMOTE=${HOST}:${DIRECTORY}/${NAME} | |
TMPFILE=/tmp/${RANDOM}.scap | |
# Use in interactive mode to select the part of the screen to capture | |
screencapture -ix ${TMPFILE} | |
scp ${TMPFILE} ${REMOTE}.png | |
WEBDIR=$(basename ${DIRECTORY}) | |
echo "URL: http://${HOST}/${WEBDIR}/${NAME}.png" | |
rm ${TMPFILE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment