weather.php is a PHP script to obtain, cache, and emit a tiny string containing the current weather for a given METAR weather station location. It was designed for use to put the weather into a tmux status bar. https://gothamcode.com/weather
Find a file
2025-10-28 09:50:55 -04:00
COPYING First commit to git 2025-10-28 09:10:20 -04:00
INSTALL First commit to git 2025-10-28 09:10:20 -04:00
install.sh First commit to git 2025-10-28 09:10:20 -04:00
README First commit to git 2025-10-28 09:10:20 -04:00
README.md updated README.md 2025-10-28 09:50:55 -04:00
weather.cron First commit to git 2025-10-28 09:10:20 -04:00
weather.php First commit to git 2025-10-28 09:10:20 -04:00
weather.php.1 First commit to git 2025-10-28 09:10:20 -04:00

weather

tmuxie

weather.php is a PHP script to obtain, cache, and emit a tiny string containing the current weather for a given METAR weather station location. It was designed for use to put the weather into a tmux status bar.

Concept and Theory of operation: As is the usual case, I wrote this because I couldn't find anything else that was both designed to provide suitable output and also actually worked. weather.php periodically obtains a list of weather stations (90 days by default, and even this is probably overkill), and then at a frequency determined by the user (15 minutes by default), obtains a weather forecast from the given weather station and caches it, so that tmux doesn't cause it to request a new one every minute when it updates the status bar.

Documentation: Brief help is available when calling weather.php with its --help option. More detailed help is available by reading the man page. A sample configuration file is supplied as weather.conf-sample.php