{"id":21092366,"url":"https://github.com/dfuchss/mensabot","last_synced_at":"2026-02-01T00:31:10.490Z","repository":{"id":65591713,"uuid":"571789132","full_name":"dfuchss/mensabot","owner":"dfuchss","description":"A matrix bot that reminds you of your food in your canteen","archived":false,"fork":false,"pushed_at":"2026-01-25T01:53:46.000Z","size":530,"stargazers_count":8,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-25T08:58:27.815Z","etag":null,"topics":["bot","canteen","canteen-meals","kit","langchain4j","matrix","mensa","ollama","trixnity"],"latest_commit_sha":null,"homepage":"https://fuchss.org/projects/mensabot","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfuchss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-28T22:15:09.000Z","updated_at":"2026-01-24T20:55:51.000Z","dependencies_parsed_at":"2023-10-11T14:25:44.865Z","dependency_job_id":"372e38a8-3c13-4346-aef6-5733151e01de","html_url":"https://github.com/dfuchss/mensabot","commit_stats":null,"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"purl":"pkg:github/dfuchss/mensabot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfuchss%2Fmensabot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfuchss%2Fmensabot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfuchss%2Fmensabot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfuchss%2Fmensabot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfuchss","download_url":"https://codeload.github.com/dfuchss/mensabot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfuchss%2Fmensabot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28961953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T23:03:11.038Z","status":"ssl_error","status_checked_at":"2026-01-31T22:56:44.691Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","canteen","canteen-meals","kit","langchain4j","matrix","mensa","ollama","trixnity"],"created_at":"2024-11-19T21:53:42.874Z","updated_at":"2026-02-01T00:31:10.484Z","avatar_url":"https://github.com/dfuchss.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MensaBot - A bot that reminds you of your food in your canteen\n\nThis bot sends you a daily reminder of the current food in your canteen (dt. mensa).\nAdditionally, you can use commands to request the listing directly.\n\n## Features\n\n* Schedule daily posts about the food in your canteen\n* Request summary of food in your mensa (at the current date)\n* Change display name per room\n* Simple rights management (only configured admins can interact with the bot)\n\n![Functions](.docs/imgs/functions.png)\n\n### Supported APIs\nThis bot aims to support multiple canteen APIs. For details about the implementation, take a look at [Development](#development).\n\nCurrently, the bot supports the following mensa:\n* [Studierendenwerk Karlsruhe](https://www.sw-ka.de/en/hochschulgastronomie/speiseplan/)\n\n## Setup\n\n1. Get a matrix account for the bot (e.g., on your own homeserver or on `matrix.org`)\n2. Prepare configuration:\n    * Copy `config-sample.json` to `config.json`\n    * Enter `baseUrl` to the matrix server and `username` / `password` for the bot user\n    * Add yourself to the `admins` (and delete my account from the list :))\n    * You can limit the users that can interact with the bot by defining the `users` list\n3. Either run the bot via jar or run it via the provided docker.\n    * If you run it locally, you can use the environment variable `CONFIG_PATH` to point at your `config.json` (defaults to `./config.json`)\n    * If you run it in docker, you can use a command similar to this `docker run -itd -v $LOCAL_PATH_TO_CONFIG:/usr/src/bot/data/config.json:ro ghcr.io/dfuchss/mensabot`\n\n### Configuration Options\n\nThe `config.json` file contains all configuration options for the bot. Here's a detailed explanation of each option:\n\n#### Required Configuration Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `baseUrl` | string | The base URL of the Matrix server the bot should connect to (e.g., `\"https://matrix-client.matrix.org\"`) |\n| `username` | string | The username of the bot's Matrix account |\n| `password` | string | The password of the bot's Matrix account |\n| `admins` | array of strings | List of Matrix user IDs that have admin privileges (e.g., `[\"@user:matrix.org\"]`) |\n\n#### Optional Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `prefix` | string | `\"mensa\"` | The command prefix the bot listens to. Commands will be invoked with `!\u003cprefix\u003e \u003ccommand\u003e` |\n| `dataDirectory` | string | `\"./data/\"` | Path to the directory where the bot stores databases and media files |\n| `timeToSendUpdates` | string | - | The time when the bot sends daily meal updates to subscribed rooms (format: \"HH:MM\", e.g., `\"07:30\"`) |\n| `users` | array of strings | `[]` | List of Matrix server domains or user IDs that are allowed to interact with the bot. If empty, all users can interact. Use domains like `\":matrix.org\"` to allow all users from a server |\n| `subscribers` | array of strings | `[]` | List of room IDs that are subscribed to daily meal updates. Rooms must be manually added to this list by an admin after users request subscription via the `!mensa subscribe` command |\n| `canteensForSubscribers` | array of strings | `[\"adenauerring\"]` | List of canteen identifiers that the bot provides information about for subscribed rooms |\n| `translation` | object | `null` | Configuration for automatic translation of menus (alpha feature) |\n\n#### Translation Configuration (Optional)\nIf you want to enable automatic translation of menus, add a `translation` object with these options:\n\n* **`ollamaServerUrl`** (string): URL of your Ollama server for translation\n* **`ollamaUser`** (string, optional): Username for Ollama server authentication\n* **`ollamaPassword`** (string, optional): Password for Ollama server authentication  \n* **`model`** (string, default: `\"llama3.1:8b\"`): The language model to use for translation\n* **`prompt`** (string): The prompt template for translation. Use `{}` placeholders for model name and text to translate\n\nExample translation configuration:\n```json\n\"translation\": {\n    \"ollamaServerUrl\": \"http://localhost:11434\",\n    \"model\": \"llama3.1:8b\",\n    \"prompt\": \"Translate this menu to English. Keep markdown and emojis. Just start with the markdown, no further output. In the end add 'Translated by {}.'\\\\n{}\"\n}\n```\n\n#### Example Configuration\n```json\n{\n    \"prefix\": \"mensa\",\n    \"baseUrl\": \"https://matrix-client.matrix.org\",\n    \"username\": \"your-bot-username\",\n    \"password\": \"your-bot-password\",\n    \"dataDirectory\": \"./data/\",\n    \"timeToSendUpdates\": \"07:30\",\n    \"admins\": [\n        \"@your-username:matrix.org\"\n    ],\n    \"users\": [\n        \":matrix.org\",\n        \":your-homeserver.org\"\n    ],\n    \"subscribers\": [],\n    \"canteensForSubscribers\": [\"adenauerring\"],\n    \"translation\": null\n}\n```\n\n## Usage\n\n* An admin can invite the bot to an *unencrypted* room. If the room has enabled encryption or if the invite was not sent by an admin, the bot ignores it (without logging it)\n* After the bot has joined use `!mensa help` to get an overview about the features of the bot (remember: the bot only respond to admin users)\n* In order to get daily notifications about the food in your canteen, simply use `!mensa subscribe`. This command will display the room ID and instructions to contact a bot admin. An admin must then manually add the room ID to the `subscribers` list in the config file and restart the bot.\n\n## Development\n\nI'm typically online in the [Trixnity channel](https://matrix.to/#/#trixnity:imbitbu.de). So feel free to tag me there if you have any questions.\n\n* The bot is build using the [Trixnity](https://trixnity.gitlab.io/trixnity/) framework.\n* The basic functionality is located in [Main.kt](src/main/kotlin/org/fuchss/matrix/mensa/Main.kt). There you can also find the main method of the program.\n* Every canteen that shall be considered has to implement the `CanteenAPI`. Currently, there is only one implementation for\n  the [sw-ka.de interface](https://sw-ka.de).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfuchss%2Fmensabot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfuchss%2Fmensabot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfuchss%2Fmensabot/lists"}