jehiah / jehiah-scripts

No description has been added.

Clone this repository (size: 13.8 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/jehiah/jehiah-scripts/
commit 7: e06f3dcb6fca
parent 6: 753f8995e631
branch: default
tags: tip
adding checking for python.current
Jehiah Czebotar / jehiah
3 weeks ago
jehiah-scripts / sdk_screenshot.sh
r7:e06f3dcb6fca 23 loc 696 bytes embed / history / annotate / raw /
#!/bin/sh

# script to screenshot the iPhone Simulator to the correct size
# to upload to iTunes Connect
# written by Jehiah Czebotar http://jehiah.cz/

OUTPUTDIR=~/Desktop
TEMPFILE=iPhoneSimulatorScreenshot_`date +%Y%m%d_%H%M%S`.png

echo "output filename:\c"
read -e OUTPUTFILE

# activate iPhone Simulator so it's easy to click on 
osascript -e 'tell application "iPhone Simulator"' -e 'activate' -e 'end tell'

# capture the screen
screencapture -iowW $OUTPUTDIR/$TEMPFILE 

# resize to the apple upload size, 320x480
sips -c 480 320 $OUTPUTDIR/$TEMPFILE --out $OUTPUTDIR/$OUTPUTFILE

# resize to something else, say 176x260
#sips -z 260 176 $OUTPUTDIR/$TEMPFILE --out $OUTPUTDIR/$OUTPUTFILE