added readme.md
This commit is contained in:
2
main.py
2
main.py
@@ -107,7 +107,7 @@ def check_books(user, pw, recipient_email):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Load user credentials from JSON file
|
# Load user credentials from JSON file
|
||||||
with open("users.json", "r") as file:
|
with open("./users.json", "r") as file:
|
||||||
users = json.load(file)
|
users = json.load(file)
|
||||||
|
|
||||||
# Iterate over all users
|
# Iterate over all users
|
||||||
|
|||||||
37
readme.md
Normal file
37
readme.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Lend Expire Notification
|
||||||
|
...for Stadtbibliothek Radebeul
|
||||||
|
|
||||||
|
## About
|
||||||
|
This script checks the current lends of the user. If a lend is about to expire it sends an e-mail notification.
|
||||||
|
|
||||||
|
To get the Information the script simulates a user. It does a login to the OPAC System of the Stadtbibliothek Radebeul and extracts the information from the website.
|
||||||
|
To archive this, it utiles using selenium.
|
||||||
|
|
||||||
|
Each run will trigger one e-mail, so trigger or run in the desired frequency.
|
||||||
|
|
||||||
|
## Getting Stared
|
||||||
|
|
||||||
|
1. Check out the repo
|
||||||
|
2. Add username, password and email address in the users.json file
|
||||||
|
3. create a ".env" file or past the following configurations varabiles into the environment varabiles
|
||||||
|
|
||||||
|
## Enviornment Varables
|
||||||
|
|
||||||
|
```
|
||||||
|
SMTP_SERVER=mail.server.com
|
||||||
|
SMTP_PORT=587
|
||||||
|
EMAIL_ADDRESS=sender-mail
|
||||||
|
EMAIL_PASSWORD=password
|
||||||
|
DAYS_BEFORE=3
|
||||||
|
```
|
||||||
|
|
||||||
|
## users.json
|
||||||
|
```
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"username": "username",
|
||||||
|
"password": "password",
|
||||||
|
"recipient_email": "notification_mail"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user