aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: e300384631639628d3cbe952859e8fe8875b30de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Daily Poem

This is a simple Python program to request a random poem from the 
[PoetryDB API](https://github.com/thundercomb/poetrydb) and email it to 
configurable email addresses.

## Prerequisites

In order to run this program, you must have a compatible version of Python 
installed. You must also have a way to send emails, such as the `mailutils` 
package on Debian.

## Set-Up & Running

First, clone the repository and enter the directory:

```bash
git clone <REPO_URL>
cd daily-poem
```

Next, install the required Python packages:

```bash
pip install -r requirements.txt
```

Finally, you will need to edit the `main.py` file and replace the following 
variables with your own values:

- `sender_email`: Enter the email address you want the emails to be sent 
from; e.g., `my_user@server.local`
- `recipient_emails`: Enter the email addresses that the poem will be sent to, 
in the form of a list; e.g., `['user1@example.com', 'user2@example.com']`
- `smtp_server`: The SMTP server you want to user, defaults to `localhost`.

Once the variables are updated, you may run the script:

`python main.py`