Skip to content

ZeroOne3010/speeding-hsl-busses

Repository files navigation

Puksun bussit -Bluesky-botti

Botti, joka kertoo Blueskyhin @puksunbussit.bluesky.bot, jos bussit kaahaavat Pukinmäessä kuvan alueella:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": 1,
      "properties": {
        "ID": 0
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              24.990907,
              60.247617
            ],
            [
              24.990907,
              60.243575
            ],
            [
              24.994711,
              60.243575
            ],
            [
              24.994711,
              60.247617
            ],
            [
              24.990907,
              60.247617
            ]
          ]
        ]
      }
    }
  ]
}
Loading

Techy stuff

Ensure ts-node is installed: npm install -g ts-node. Then build with npm install and run with npm start for production or npm dev for development. Run tests with npm test. Create an app password for the bot and then fill in the Bluesky secrets into the .env file for development mode or environment variables in production mode. SQLite persistence defaults to /data/hsl-bus-observations.db on Fly.io. Override the path locally with SQLITE_DB_PATH.

Uses the Digitransit API: https://digitransit.fi/en/developers/apis/5-realtime-api/vehicle-positions/high-frequency-positioning/

Relies on the following libraries:

About

A Bluesky bot that sends a message when an HSL bus is speeding.

Resources

License

Stars

Watchers

Forks