You will not forget your umbrella anymore. ☔
Check every morning at 5 AM local time if it will be raining that day, if yes send an email with forecast message like this:
Hour [h] | Probability [%] |
---|---|
6 | 0 |
7 | 0 |
8 | 0 |
9 | 0 |
10 | 10 |
11 | 22 |
12 | 35 |
13 | 60 |
14 | 86 |
15 | 100 |
16 | 100 |
17 | 100 |
18 | 100 |
19 | 72 |
20 | 36 |
21 | 5 |
22 | 0 |
23 | 0 |
- Create Gmail account and enable the Less secure app access and also create an OpenWeather API Key.
- Create
credentials/credentials.yaml
file and put Gmail and OpenWeather credentials from step 0.
senderEmail: <sender Gmail email>
senderPassword: <Gmail email password>
openWeatherApiKey: <OpenWeather API key>
- Create
credentials/receivers.txt
file put in email subscribers. For example:
example1@email.com, Zagreb
example2@email.com, Berlin
example3@email.com, Milwaukee
example4@email.com, Mobile Alabama
example5@email.com, Nashville Tennessee
example6@email.com, Nashville Indiana
- Run the app using Makefile as
make run
- (Recommended) You can schedule the script to run on GitHub servers like we did in our GitHub Actions CI workflow. See the Instructions for more info.