Skip to content

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Weather Sender

This is a simple python script that sends a plain text message containing information about the weather over SMTP.

Usage

Before any weather can be sent, a configuration file must be generated.
This can be done by running:

./sendWeather

Additionally, you will need to fill in the following configuration values.

location = none
recipient = none
mailServer = smtp.gmail.com
port = 587 
militaryTime = False

Where:
location is where you wish to see the weather reported from.
recipient is where you wish to send the generated message.
mailServer is the email server you wish to log into. Defaults to smtp.gmail.com.
port is the port of the email server you wish to connect to. Defaults to 587.
militaryTime definses whether or not weather alerts are conveyed using civilian or military time.
True = Miltary time, False = Civilian time. Defaults to False.

The script relies on two system environment variables:

EMAIL_ADDRESS
EMAIL_PASS

These environment variables are used for secure email server login.
Please take a moment to set these environment variables to their corresponding values.
While you can store your credentials in the script, it is not recommended.

Once you have completed configuring and set the system environment variables, messages are ready to be sent. Do so by running:

./sendWeather

Required Packages and Components

python3
the ability to reach wttr.in
an email address

About

Send me the weather

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages