Please find the problem statement here.
- Install python 2.7.12 from [here] (https://www.python.org/downloads/release/python-2712/)
- Clone the repository using
git clone -b master https://github.com/ayush-vibrant/Serioholic-TV-Series-Reminder-Innovacer
. - Install python-dotenv from here
- For security reasons file with details of database and sender's account credentials is not commited on git. So create a file
.env
in the root folder with the following contents,
FROM_EMAIL = 'MY_EMAIL'
PASSWORD = 'MY_EMAIL_PASSWORD'
host="MY_HOST"
user="MY_USER"
password="MY_PASSWORD"
- Run
main.py
to start the project
- All the scipts that I have created were tested successfully on Linux based OSes with Python 2.7.12 installed on the system.
- Aforementioned script requires email address and list of favourite TV series for multiple users as input. The prompt is as follows:
Email address: [email protected]
TV Series: Game of thrones, suits, friends, black mirror, gotham - The script (database.py) stores the input data in
series
table in MySQLdb namedmydatabase
. - A single email is sent to the input email address with all the appropriate response for every TV series. The content of the mail depends on the following use cases:
- Exact date is mentioned for next episode.
- Only year is mentioned for next season.
- All the seasons are finished and no further details are available.
Below picture shows the sample e-mail response genereated by the
utility.py
.