This library takes an arbitrary input and outputs GBFS data which can be fed directly into OTP.
It is available as a container and it's quite simple to run with the following command:
docker run --rm -v $(pwd):/app/out/:z ghcr.io/mobidata-bw/x2gbfs:2024-03-04T12-01 -p noi -b https://leonard.io/gbfs/
This will do two things:
mount your current directory into the container
build the GBFS feed and places it into the current folder (on the host, not container)
Now you have bunch of static files that you need to pubish somewhere. Of course you want to run this process every few minutes to have up-to-date information.
Base URL
GBFS requires fully qualified URLs so you need to specify a base URL with the -b parameter. In my example above I have set it to https://leonard.io/gbfs/ but of course when you deploy it to your own infrastructure you want to change it to one of your domains.
I have recently added support for the NOI carsharing vehicles in https://github.com/mobidata-bw/x2gbfs/.
This library takes an arbitrary input and outputs GBFS data which can be fed directly into OTP.
It is available as a container and it's quite simple to run with the following command:
This will do two things:
Now you have bunch of static files that you need to pubish somewhere. Of course you want to run this process every few minutes to have up-to-date information.
Base URL
GBFS requires fully qualified URLs so you need to specify a base URL with the
-b
parameter. In my example above I have set it tohttps://leonard.io/gbfs/
but of course when you deploy it to your own infrastructure you want to change it to one of your domains.cc @dulvui @rcavaliere