Tools to convert Social Bicycles (SoBi) rides into GPX, to upload to Strava
-
Clone this repo
-
Install python dependencies
pip install -r requirements.txt
-
Install jq
Set your SoBi access token:
export sobi_access_token="your access token here"
Download your most recent route:
./sobi-get-routes.sh | jq '.items[0]' > route.json
[Optionally] find the bike ID
bike_id=$(jq '.bike_id' route.json)
[Optionally] use that bike ID to look up its "name" in the system:
./sobi-get-bike.sh "$bike_id" | jq -r '.name'
Convert SoBi's route JSON into GPX:
./sobi_route_to_gpx.py route.json > route.gpx
That route.gpx
file should be good to manually upload to Strava, here:
Use Strava's API to auto-upload activities