This application sends changes of your timetable as a Telegram message.
It works with Untis and currently all strings are hardcoded in German, but feel free to change the software according to your needs.
This application has the reached the end of its life as it is no longer actively being used in production. If you're searching for an alternative, I recommend checking out the substitution-schedule-parser.
First you have to get Telegram bot name and token. You can request this from the BotFather.
Now you've got two options to install the TimetableBot:
This should work on every system where you can install Java 11
- Install Java 11 or higher
- Install MySQL or MariaDB
- Download the latest release and extract it
- Edit the configuration file in the
config
folder. You have to change the database settings, insert your telegram name and token and add a Base64 authentication for the timetable. - Change the name of the configuration file from
example.config.ini
toconfig.ini
- Run the application via
java -jar timetablebot.jar
This only works on Amd64 Linux
- Install docker
- Install docker-compose
- Run the following commands to download the docker-compose.yml file and the configuration
# Create a new directory
mkdir timetablebot && cd timetablebot/
# Download the docker-compose.yml
curl -LO https://raw.githubusercontent.com/stundenplanbot/bot/master/docker-compose.yml
# Create a new directory for the configuration
mkdir config && cd config/
# Download the default configuration
curl -LO https://raw.githubusercontent.com/stundenplanbot/bot/master/config/example.docker-compse.config.ini
# Copies the configuration if it's non-existent
cp -n example.docker-compse.config.ini config.ini
- Edit the configuration
- Start docker compose via
docker-compose up
- Download the latest release and extract it
- Replace the
timetablebot.jar
file - See if the
example.config.ini
has changed and add new configuration options to yourconfig.ini
to prevent a error at startup.
- Download a updated docker compose file
- Run
docker-compose pull
to update the images - See if the
example.docker-compose.config.ini
has changed and add new configuration options to yourconfig.ini
to prevent a error at startup.
Here's a list of all command you can run in Telegram.
You can also get this list by running /helpcmd
.
If you don't have administrative rights the list may be shorter.
/broadcast
- (ADMIN) Send a message to all of your users/deletedata
- Deletes all of the users data/feedback
- Allows users to voice their feedback/grade
- Changes your grade, so that you only get the correct timetable changes/help
- Shows a help menu and a description/helpcmd
- Gets this list/mensa
- Shows the current cafetiera meals/msguser
- (ADMIN) Send a message to one user/news
- Shows the news atop of the timetable/newschoolyear
- (ADMIN) Send a message to all of your users with details about the new school year/panicshutdown
- (ADMIN) Shutdown the bot if something is goes wrong/refreshmensa
- (ADMIN) Reloads the cafetiera meals from the database/tokens
- Shows all shortcut for teachers used in the timetable
Start here if you use docker compose
If you use Docker compose you can enter your database server with docker-compose exec mariadb sh
.
Login into your mysql server with the credentials given in your docker-compose.yml
file using
mysql -uroot -Dtimetablebot -p
. Enter the given password (defined with MYSQL_PASSWORD
) when promted.
Start here if you installed MySQL or MariaDB by yourself and login into your SQL server
- Show all users using
SELECT * FROM users;
. - Search for your Telegram name (column
name
) and write down thechatid
- Run
UPDATE users SET `rank` = 'ADMIN' WHERE chatid = [INSERT YOUR CHATID HERE];
- Now you've got admin rights. Check the result with
SELECT * FROM users;
. Yourank
should beADMIN
. - Restart the bot. If your running it via docker you can use
docker-compose restart ttbot
.
Via the /mensa
command you can show the cafertia meals for the next two days.
This only works automatically if the CafertiaParser
works as intendend,
but this isn't always the case,
so you can scan the plan by yourself and upload the meals for the week.
To do this you can use the scanner app and the scanner api.