Skip to content

Instantly share code, notes, and snippets.

@jmhale
Created December 21, 2022 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmhale/777a065861f46df9b205811a48b1b4f0 to your computer and use it in GitHub Desktop.
Save jmhale/777a065861f46df9b205811a48b1b4f0 to your computer and use it in GitHub Desktop.
METAR/TAR Functions
# Functions to get METAR/TAFs from checkwx.com. Defaults to KDCA for both.
function metar() {
if [ "$1" != "" ]
then
curl "https://api.checkwx.com/bot/metar/$1?x-api-key=$CHECK_WX_API_KEY"
else
curl "https://api.checkwx.com/bot/metar/KDCA?x-api-key=$CHECK_WX_API_KEY"
fi
}
function taf() {
if [ "$1" != "" ]
then
curl "https://api.checkwx.com/bot/taf/$1?x-api-key=$CHECK_WX_API_KEY"
else
curl "https://api.checkwx.com/bot/taf/KDCA?x-api-key=$CHECK_WX_API_KEY"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment