This swiftbar plugin is a Go (and Mac) port of the waybar-iceportal plugin by e1mo. When on a Deutsche Bahn ICE train it queries the onboard iceportal api and displays the upcoming station as well as the next stops, wifi quality and train speed.
Go
I recommend to compile the binary and put it in to ~/.swiftbar/iceportal.1m.cgo
because of one external dependency for the cookiejar.
this is more or less a WIP since I only tested against the test data provided by @e1mo. I will verify it on my next journey and upload some more test data.
To test on your own I recommend to set local = true
. It will use the json files in testdata/