From d70629daf0de6cc42f8c8f39b590ed87c9b3e23e Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 22 May 2023 15:18:04 -0500 Subject: initial commit --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..e300384 --- /dev/null +++ b/README.md @@ -0,0 +1,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 +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` -- cgit v1.2.3-70-g09d2