Onleiharr allows users to monitor specific URLs on the Onleihe website, receive notifications when new media is available, and automatically rent or reserve media based on predefined keywords.
- Automatic Login: Logs in to the Onleihe website using the provided credentials.
 - URL Monitoring: Continuously checks specified URLs for new media.
 - Notifications: Sends notifications for new media availability using Apprise.
 - Automatic Renting: Rent or reserve media based on titles specified in 
auto_rent_keywords.txt. 
- Install the required Python packages:
pip install -r requirements.txt - Make a copy of the provided 
config.example.initemplate toconfig.iniandapprise.example.ymltoapprise.yml - Modify both as per your needs.
 
The config.ini file contains several sections:
[GENERAL]:
poll_interval_secs: Interval in seconds between consecutive checks of the Onleihe URLs.auto_rent_keywords_path: Path to the text file containing part of the titles of media to be auto-rented.
[NOTIFICATION]:
apprise_config_path: Path to the Apprise configuration file for notifications.test_notification: Set toTrueto send a test notification on startup. Otherwise, set toFalse.email: E-Mail address to receive Onleihe media reservation/availability mails (can be omitted)
[ONLEIHE-CREDENTIALS]:
username: Your Onleihe username.password: Your Onleihe password.library: The name of your library.library-id: Your personal library ID.
[ONLEIHE-URLS]:
- List of URLs to monitor. Add more URLs as needed. Make sure to sort the page that new media is always at the top.
 
- Setup 
config.iniandapprise.ymlto your needs. - Specify titles of media you want to auto-rent in 
auto_rent_keywords.txt. - Run the 
main.pyscript. 
- build docker image using 
docker build -t onleiharr . - make sure all config files exists in current host folder (auto_rent_keywords.txt, apprise.yml and config.ini)
 - start docker container using 
docker run -it --rm --name onleiharr -v $(pwd)/apprise.yml:/app/apprise.yml -v $(pwd)/config.ini:/app/config.ini -v $(pwd)/auto_rent_keywords.txt:/app/auto_rent_keywords.txt onleiharr 
- modify your vars based on ansible/onleiharr.yaml in ansible/vars/external_vars.yml
 - run the playbook on your inventory 
ansible-playbook -i your_inventory ansible/onleiharr.yaml 
This project is licensed under the MIT License.
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
Note: The Onleiharr project and this README are independent and not affiliated with the official Onleihe website or the organizations behind it.
