Skip to content

a bash script for a easy to use weather alert system. not as strong as the NWS. really dont use this if you have access to a real doppler and a set of eyes!!!

Notifications You must be signed in to change notification settings

TatorInfinity/Weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

A lightweight Bash script that monitors weather conditions and alerts you with audible beeps for severe weather. This tool logs forecasts and weather alerts for multiple U.S. ZIP codes or latitude/longitude coordinates.

**Disclaimer:** This script is **not** a replacement for official weather systems. It uses data from public APIs and should only be used for **logging or low-priority weather checks**. For emergencies, refer to the National Weather Service (NWS) or your local authorities.


## πŸ“¦ Features

* Monitor multiple ZIP codes or lat,lon coordinates.
* Alerts with sound when there's a **severe weather warning** (like Tornado, Flood, Storm).
* Logs forecast and alert info to a timestamped file.
* Text-to-speech announcement with `espeak`.
* Simple interactive terminal menu.

---

## πŸ›  Requirements

Make sure the following tools are installed:

* `bash`
* `curl`
* `jq`
* `espeak` (for alert sound)

Install dependencies on Debian-based systems:

```bash
sudo apt update
sudo apt install jq espeak curl
```

---

## πŸ“‚ Directory Structure

* `~/.weather_alert/locations.txt` β€” List of monitored ZIPs/coordinates.
* `~/.weather_alert/logs/` β€” Logs for each weather check.

   ```

2. **Options Menu:**

   ```
   1. Add location (ZIP or lat,lon)
   2. Remove location
   3. List saved locations
   4. Start monitoring (runs until stopped)
   5. Exit
   ```

3. **During alerts:**

   * You'll hear beeps and the event will be read aloud.
   * Press `q` to silence the alert.

---

## πŸ“ Example Usage

### Add a ZIP code:

```
> 1
Enter ZIP or lat,lon: 90210
πŸ“ Added: 90210
```

### Monitor:

```
> 4
==== WEATHER UPDATE [2025-07-20 08:00:00] ====
🌐 [Beverly Hills, CA] (34.0901,-118.4065)
Forecast:
Today: Sunny with a high near 85Β°F...

πŸŒ€ Alerts:
πŸ”Ί Heat Advisory | Severity: Moderate
...
```

---

## 🧹 Reset Locations

To clear all saved locations:

```bash
rm ~/.weather_alert/locations.txt
```

---

## πŸ“‹ Notes

* This script uses:

  * [Zippopotam.us](http://api.zippopotam.us/) for ZIP-to-coordinates
  * [weather.gov](https://www.weather.gov/documentation/services-web-api) (NWS API) for forecast and alert data
* The update interval is **60 seconds** (can be changed in the script).

#didnt write this fully myself but i reviewed it and this is how this is built.

About

a bash script for a easy to use weather alert system. not as strong as the NWS. really dont use this if you have access to a real doppler and a set of eyes!!!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages