Skip to main content

Get the next in coming buses at a Paris area Station.

Project description

A bot/ cli tool that simply gives you the waiting times for next buses at your favorite bus stop.

It works only for the IDFM/RATP Network, relying on the api lines/v4. For now only a handfull of bus stops on the Plateau de Saclay are registered, but you can add your own

Example

$ nbb mdv
Next buses at Mare du Vivier:
- ⏰  6 min. (12:29)  9️⃣ 🚍 ▶ Centre Commercial Ulis 2
- ⏰ 27 min. (12:50)  9️⃣ 🚍 ▶ Gare de Jouy en Josas
- ⏰ 35 min. (12:58)  9️⃣ 🚍 ▶ Centre Commercial Ulis 2
- ⏰ 53 min. (13:16)  9️⃣ 🚍 ▶ Christ de Saclay

Installation

Pip Installation

$ pip install next-bus-bot

Developer Installation

  1. clone the repo

    $ git clone git@github.com:paquiteau/nbb/
  2. create your venv with your favorite tool

  3. Install locally the package with bells and whistles

    $ (venv) pip install -e .[dev,test]
  4. Run tests

    $ pytest

TODO

  • automatic aliasing of stops (based on initials )

  • support for direction filtering

  • publish on PyPi

  • Add support for a bot front-end (slack, discord, IRC, etc).

  • Extend the useful bus stops.

Configuration

nbb can be configured via its command line argument, or via a config file nbb_conf.toml, it uses TOML https://toml.io/en/ syntax formatting. Suitable location for the config file are, loaded in this order:

  1. nbb/nbb_conf.toml

  2. ~/.config/nbb_conf.toml

  3. nbb_conf.toml in current directory.

  4. nbb –config <file>

An example (and default) config file is available in nbb/nbb_conf.toml.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

next-bus-bot-1.0.3.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

next_bus_bot-1.0.3-py3-none-any.whl (9.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page