Created
November 17, 2012 18:54
-
-
Save SamWhited/4098832 to your computer and use it in GitHub Desktop.
Scripts I wrote to manage weather alerts and data
This file contains hidden or 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 | |
# Used to sync METAR data for Airports I want updates from. | |
# All data can be fetched via FTP but that's a waste of bandwidth. | |
curl --silent "http://weather.noaa.gov/pub/data/observations/metar/stations/{KFTY,KATL}.TXT" -o "/var/www/weather.noaa.gov/pub/data/observations/metar/stations/#1.TXT" |
This file contains hidden or 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 | |
# Tweet METAR data using the ruby gem `t'. | |
# https://twitter.com/METARKFTY | |
PATH=/usr/local/rvm/gems/ruby-1.9.3-p194/bin/ | |
t update "`cat /var/www/weather.noaa.gov/pub/data/observations/metar/stations/KFTY.TXT | tail -n 1`" |
This file contains hidden or 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 | |
# Send METAR data to a phone. | |
# Works well as a morning cronjob: 0 9 * * * /path/to/txtMETAR | |
cat /var/www/weather.noaa.gov/pub/data/observations/metar/stations/KFTY.TXT | tail -n 1 | mail [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment