Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tommasoamici/ah-bonus-bot
A Telegram bot to track products on ah.nl and be notified of discounts
https://github.com/tommasoamici/ah-bonus-bot
ah albert-heijn telegram-bot
Last synced: 11 days ago
JSON representation
A Telegram bot to track products on ah.nl and be notified of discounts
- Host: GitHub
- URL: https://github.com/tommasoamici/ah-bonus-bot
- Owner: TommasoAmici
- License: mit
- Created: 2023-05-01T19:48:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-09T05:42:23.000Z (13 days ago)
- Last Synced: 2024-12-09T09:17:14.490Z (13 days ago)
- Topics: ah, albert-heijn, telegram-bot
- Language: Rust
- Homepage: https://t.me/AHBonusBot
- Size: 270 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AH Bonus Bot
This repo contains the source code for a Telegram bot that allows users to track products
on [ah.nl](https://www.ah.nl) and get notified when they go on sale.## Usage
There are two components to this bot: the Telegram bot itself and a notification service.
The bot should always run to accept user input and to store the tracked products.The notification service can be run on a schedule to check for price changes and send out
notifications if any tracked product is on sale. Since AH's discounts are valid for a week,
it is sufficient to run the notification service once a week on Monday.Both binaries are built from the [`telegram_bot`](./crates/telegram_bot/) crate. After
building, the `bot` and `notify` binaries can be found in the `target/release` directory.You can build the binaries with the following command:
```sh
cargo build --release
```## Development
The [Makefile](./Makefile) contains targets to run both binaries locally, `make run` and
`make notify`. A a `.env` file with the following environment variables is required:```sh
DATABASE_URL=sqlite:ah_bonus.db
TELOXIDE_TOKEN=XXX
```You can request a bot token from the [BotFather](https://t.me/botfather).
### AH API
The reverse engineered AH API is documented in the [`ah_api`](./crates/ah_api/) crate.