Skip to content

Instantly share code, notes, and snippets.

@monksy
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save monksy/e5db51c39a589333e8b5 to your computer and use it in GitHub Desktop.

Select an option

Save monksy/e5db51c39a589333e8b5 to your computer and use it in GitHub Desktop.
Generate a Flight Radar image for background reasons
#!/bin/bash
# */15 9-18 * * 1,2,3,4,5 /home/shicks/testenvironment/flightradar/flightscreenshot.sh
rm desktopfile.png
xvfb-run -a -s "-screen 0 3200x900x24" wkhtmltoimage --width 1500 --height 900 --javascript-delay 3000 --crop-x 224 --crop-y 51 --crop-w 930 --crop-h 352 -q http://www.flightradar24.com/41.98,-87.91/8 desktopfile.png
width=`identify -format %w desktopfile.png`;
datetime="`date`"
rm annotateddesktop.png
convert -background '#0008' -fill white -gravity center -size ${width}x30 caption:"ORD @ $datetime" desktopfile.png +swap -gravity south -composite annotateddesktop.png
rm desktopfile.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment