patcon / bikebikeshareshare-bot

A bot for watching a Signal messenger group, and sharing bikeshare pin codes for those who ask.
0 stars 1 forks source link

bike bike share share bot

Keep a Changelog v1.1.0 badge Swagger API badge

A bot for watching a Signal messenger group, and sharing bikeshare ride codes with those who ask.

It runs on a Digital Ocean instance as a daemonized process that watches a designated group for messages.

Commands

Command Description
<location>
:round_pushpin:
"what's nearby?" Requests info from nearest station.
<location>
:bike::pray:
"bike, please!" Requests ride code for nearest station.
:lock::arrow_left::bike: "bike's returned!" Tells group that bike was returned, and echos final ride time.
:stopwatch: "what's my ride status?" Great for mid-trip, this echos current ride time. (same as above)

Roadmap

Usage

Requirements: signal-cli (already configured)

# One terminal window
$ make start-daemon PHONE=+15555555555

# New terminal window
$ brew install python@3.9 pygobject3 gtk+3
$ pipenv --python `which python3.9` --site-packages install
$ cp sample.env .env
$ vim .env
$ make prepare-osx
$ pipenv run python check.py --help

Usage: check.py [OPTIONS]

  Check messages in a Signal group for Bikeshare Toronto code requests.

Options:
  -u, --bikeshare-user TEXT       Bikeshare Toronto member account username
                                  (not yet functional)

  -p, --bikeshare-pass TEXT       Bikeshare Toronto member account password
                                  (not yet functional)

  -t, --bikeshare-auth-token TEXT
                                  Bikeshare Toronto member account derived
                                  authorization token  [required]

  -k, --bikeshare-api-key TEXT    Bikeshare Toronto application API key
                                  [required]

  -g, --signal-group TEXT         Signal messengers group ID  [required]
  --noop                          Fake contact to Bikeshare servers
  -d, --debug                     Show debug output
  -h, --help                      Show this message and exit.