Skip to content

ngshaohui/BusArrivalBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BusArrivalBot

Telegram Bot to get bus arrival timings in Singapore

Try it out at @BusArrivalBot

Setup instructions

This project manages its dependencies using uv

Install it first before proceeding

Environment values

Create a file .env containing the keys from .env.example

You will need a bot token from @BotFather to host your own instance of the bot

Start bot

Run an instance of the bot

The dependencies in pyproject.toml will be installed automatically

uv run bot.py

Building and running

docker build --rm -f Dockerfile -t bus-arrival-bot:0.1.0 .
docker run --name bus-arrival-bot --rm bus-arrival-bot:0.1.0

Milestones

Milestone 1 (done)

  • Search for busses by location and bus stop code
  • Host bot on server

Milestone 2 (done)

  • Rate limiting (done)
  • Refresh button (done)

Milestone 3

  • Search for bus stop
  • Bus route info

Milestone 4

  • Generalise reply handler
  • Scheduler for updating stops and routes

Milestone 5

  • Dockerfile
  • autopep8 and pylint configuration

Milestone 6

  • State busses not in service
  • Save stops as favourites

Chores

  • Handle memory leak from cache implementation
  • Handle request timeouts and error codes from LTA Datamall
  • Fix comments
  • Typecheck
  • Optimize Dockerfile (currently 479.68 MB)

Inconsistency of result displays

Searching for bus stops yields the results in a text message, whereas location search displays it as inline keyboard buttons.

The consideration was that inline buttons are not persistent, so it makes it harder to search.

Can consider both approaches to see which provides a better UX.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy