UdS Fahrplan Bot Development Log (2) -- Planning for telegram bot

UdS Fahrplan Bot Development Log (2) -- Planning for telegram bot

This blog post is trying to tell you:

  • The motivation of making my own telegram bot
  • Is UdSfahrplan “Reinventing the wheel”?

Saarfahrplan v.s. Uni Students

Previous post: UdS Fahrplan Bot Development Log (1) – Fetching data from HAFAS and its APIs through POST requests

SaarFahrplan is a public transport app to provide real-time information and services related to public transportation in Saarland. Its target users are the people who live and travel in Saarland for general purpose. When it comes to a smaller group of users, for example Uni students, some functionalities might be redundant and we may optimized some common use case for better user experience.

Common use cases for students

Instead of searching different connections, Uni students’ timetable are usually consistent and repetitive. There are a few places where they always go, for example:

  • Go to the Uni
  • Go to the Mensa
  • Go to the Dormintory
  • Go to the City
  • Go to the Supermarket

Another scenario will be when we are in somewhere new, we would like to know how to go back home (dormitory).

Key functions on our telegram bot

Based on the above use case, So we create our own app/bot that only accommodate them.

Specified set of stations

We first made a set of stations that are commonly used by Uni students, that can be used without further search. On the other hand, we also provided a search function for other stations if needed.

/home – A function that saves your time

Originally, if you want to search for a trip in Saarfahrplan, you need to:

  1. Go to the “Trip Planner” page
  2. Type the starting location
  3. Select the correct station in the pop up fragment
  4. Back to the “Trip Planner” page
  5. Type the destination
  6. Select the correct station in the pop up fragment
  7. Back to the “Trip Planner” page
  8. Select Departure time in the pop up (optional)
  9. Press “Search Button”

This is somehow annoying if you already know which station you are planning to go. Therefore, we create the following flow:

  1. Use the /home command
  2. Select the destination
  3. Select Departure time

Since we’ve already made a set of stations, we can save lots of time from searching. Of course, if we are in a new place where the set is not included, we can:

  1. Use the /home command
  2. Select the More Stations
  3. Type the station name
  4. Select the correct station
  5. Select Departure time

All actions can be done in the same interface.

/sethome – One time setup, use forever

As we can see, the major difference between our design and the app is that we don’t have to search or select our destination when using the command /home. This is because we already stored users’ home station beforehand.

Short Summary

Instead of repeating the whole workflow, we can first save the progress of some subtasks, and retrieve them in our daily workflow to save our time.

$$\text{(Task A + Task B)}\times\text{repetitons}\Rightarrow\text{Task A + (Task B}\times\text{repetitons)}$$

Continue Reading: UdS Fahrplan Bot Development Log (3) – Implementation on /trip and /Depart function

Reference

UdS Fahrplan Bot Development Log (2) -- Planning for telegram bot

https://greenmeeple.github.io/projects/udsfahrplan-log2/

Author

Alex Li

Posted on

2025-04-28

Updated on

2025-05-14

Licensed under

Comments

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×