Files for my website
bwc9876.dev
1---
2name: Transhuh
3summary: A tool for displaying notifications when a TransLoc bus is at a specific location.
4timespan:
5 from: 2024
6internalSort: 30
7tags:
8 - rust
9 - school
10 - dbus
11links:
12 github: Bwc9876/transhuh
13image: ./transhuh.webp
14---
15
16This tool came from frustration with the bus system my school provides. We _do_ get a live map of the entire route but what I want is a way to know when a bus is nearby so I know when to leave!
17
18To fix this, I simply reverse-engineered the API of the live web view of the buses and made my own program to query it (I think I can do this, the API requires no auth).
19
20The program is passed a series of locations (called points of interest) by their latitude and longitude. Using these the program then sends a notification whenever a bus is at one of these points of interest.
21
22This is in my opinion where Rust really helped me. Easily parsing the API responses and renaming the properties with `serde`, parsing CLI args with `clap`, and making it all error safe with `anyhow` was very easy that I was able to complete this program in one section of my calculus class.
23
24I want to expand this in the future to maybe a Discord bot or something I can run to get cross-platform notifications.