NTHP

More IsMetroBurning Stuff


I wanted to make another post on IsMetroBurning, as I’ve done a fair amount with it.

Looking Less Crap


You might remember from my last post on IMB, it looked like this.

While this worked, it didn’t look great. It was just something through together quick while traveling to New York. But I wanted to make it look better.

All line test

Much better. This uses a less real fire graphic, and the real colors for the lines. Sampled from a Metro map.

Alerts


While I was working on the better look, a mod from the unofficial WMATA Discord reached out, and asked if I could integrate it with their server.

That sent me down a rabbit hole on detecting new incidents, and not sending alerts out for incident that last longer than a refresh cycle. After getting that working with a Discord test server, I told him that it should be pretty easy.

After that, I went on an alert channel spree. Adding support for X, Mastodon, BlueSky, and RSS.

BlueSky and Mastodon were pretty easy to get working. A simple curl for Masto, and a simple 11 line python script for BlueSky. X, kinda broke me.

I ended up just asking Grok how to do it. The main tools like twurl don’t work on my host (not without more work than I wanted to do). The other catch with X, is that I had to enable write permissions, then regenerate my tokens.

If you’re wondering, why support X. Because I wanted a challenge. And it gave me one.

Messages


The last thing I’ve done, is add support for incident messages.

Every WMATA incident, has a message describing it. My intermediate data file stores that, but I didn’t do anything with it for a bit. As I was going down the last rabbit hole. But I started using it.

More test server testing

The messages also get sent out on the alert channels, here’s an example.

🔥 New incident on BL line: Expect residual delays to Franconia-Springfield following an earlier train with a brake problem at King Street.

I think this project is pretty much done. I’ve met my goal of bringing back a fun, long dead site that I liked. And surpassed what the original did.

I’ve put some work into keeping external dependencies down. Only needing to install two python libraries on the server. This should run trouble free, all on its own.

As for costs. By my math, hosting on NearlyFreeSpeech.NET (both prod and testing servers) should only run me around $2.60/month. That’s for both web hosting, and CPU time. As for WMATA’s api, that’s free. They don’t charge for it.


Reply via email