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.phpYou can ask for help with weather.php on the mailing list.
View the current: README • manpage • License (GPL) • License (BSD)
Requires PHP-CLI 7.4 or greater. It needs to have PCRE, and POSIX compiled in or loaded as an extension. Virtually all PHP installations meet this requirement.