This project is a web scraper that scans the canteen website of the University of Lübeck and extracts information about the menu. It provides access to the current menus and their details, such as names, prices and vegetarian options.
Since the first version of this scraper was written in Typescript and therefore used an exorbitant amount of memory when running, I rewrote it in Rust.
I also took the opportunity to improve the design of the REST API. The documentation of the new API v2 is available here.
The API allows many query parameters to have multiple values (like arrays). Just separate the values with commas.
curl https://speiseplan.mcloud.digital/v2/meals?location=HL_ME,HL_MH | jq
The app is configured via environment variables. The following variables are available:
Name | Description |
---|---|
PORT |
The port the app will listen on. Defaults to 3030 . |
TTL |
The time to live of the menu cache containing the meals in seconds. Defaults to 60 * 10 . |
- Rust
cargo run
Per default the app will run on port 3030. You can change this by setting the PORT
environment variable.
The app is deployed on a kubernetes cluster. To deploy a new version, just push to the main branch. The cluster will automatically pull the latest version and restart the app.
The app is available at https://speiseplan.mcloud.digital/v2 .
This project uses gitmoji to make commits more expressive.
npm install -g gitmoji-cli
gitmoji -i
- Tray Application (Windows, Linux)
- KDE Plasma Widget (Linux with KDE Plasma)
- Android Widget (Android)
- MS Teams Bot (Microsoft Teams)
If you use the API in your project feel free to add it here with a PR or just open an issue.