Follow

Ever wanted to track your ICE train in the command line? No?

Anyway, you can do it now!
github.com/craftamap/iceportal

@craftamap Hmm, do you need APIs for other train types?

@x44203 right now I'm just using the APIs iceportal.de offers when you sit in an ICE and IC, but I'm open to all train types. :) hit me up, if you want to :)

@craftamap codeberg.org/x44203/ICEDataCol

API endpoints: codeberg.org/x44203/ICEDataCol

Thingie which converts JSON files to a common format of lat, lon and speed: codeberg.org/x44203/ICEDataCol

Here the getStatus() function: codeberg.org/x44203/ICEDataCol

and getTrainData()

They return the data in a common format for all three trains (more to be added in the future, feel free to send me a JSON file if you find an endpoint in a new train type)

The data format is in the class DataMapping which contains the train type, latitude, longitude, speed, extras array (which gets sampled every second or so together with first three parameters) and trainData array (sampled at startup, like train name)

@craftamap Though it currently is mostly about physical data of the train, not route planning like when its at the next stop

@craftamap Basically any train with a JSON endpoint should be easy to add in a few minutes, thats why I constructed this out of my program which was originally just for ICEs

@x44203 I see! Didn't even know some RB offer WiFi. Thanks for the input, I definitely want to add those now :)

@craftamap I honestly didn't even know they had a "public" API for that shit :|

@craftamap Weird question -- do you say "ice" (like the frozen form of water) or "I-C-E" (saying each letter seperately)?

@craftamap Thank you! That clears up a weird question I had about how the acronym was said in Deutschland.

@klaushipp

By the magic of pressing F12!

When you connect to the ice wifi on a laptop, a page containing some Infos pops up. :)

@craftamap so how long did they have to drive with random trains for the screenshot until one wasn't late? 😆

@Riedler
That train was actually late, I'm not showing that in the ui yet, though xD

Sign in to participate in the conversation
chaos.social

chaos.social – a Fediverse instance for & by the Chaos community