d6o / coronabot

CoronaBot is a simple Slack bot to update users about the virus spread progression periodically.
MIT License
20 stars 5 forks source link

CoronaBot Language Badge Go Report License Badge Status Badge

What is CoronaBot?

CoronaBot is a simple Slack bot to update users about the Corona virus spread progression periodically.

It shows the 50 most affected countries.

Where does the data come from?

Data comes from ArcGIS REST API.

Project Status

CoronaBot is on beta. Pull Requests are welcome

How to use this image

Start an instance

$ docker run -e SLACK_TOKEN=xoxp-1111111-22222-3333-444 -e SLACK_CHANNEL_ID=C5P11AABB22 diegosiqueira/coronabot

Use a custom notify interval

$ docker run -e SLACK_TOKEN=xoxp-1111111-22222-3333-444 -e SLACK_CHANNEL_ID=C5P11AABB22 -e NOTIFY_INTERVAL_MINUTES=30 diegosiqueira/coronabot

CoronaBot

Building from source

$ go install github.com/DiSiqueira/coronabot
$ export SLACK_TOKEN="xoxp-1111111-22222-3333-444"
$ export SLACK_CHANNEL_ID="C5P11AABB22"
$ coronabot

Environment Variables

SLACK_TOKEN

Slack token with permissions to post on a channel. Hot to generate a Slack Token: https://slack.com/help/articles/215770388

SLACK_CHANNEL_ID

Slack channel id can be found as the last argument on the channel url. Example channel url: https://app.slack.com/client/T0LC9999F/C5P111QZB5 Example channel id: C5P111QZB5

NOTIFY_INTERVAL_MINUTES

Interval that the bot will update the chat with the latest CoronaVirus updates in minutes. Defaults to 60.

LIST_LIMIT

Number of items that will be printed in the message. Defaults to 50. Note: A large number of items can break slack formatting.

Roadmap

Developing

PRs are welcome. To begin developing, do this:

$ git clone git@github.com:DiSiqueira/corobabot.git
$ cd corobanot/
$ go mod vendor
$ go run cmd/coronabot/main.go

Social Coding

  1. Create an issue to discuss about your idea
  2. [Fork it] (https://github.com/DiSiqueira/coronabot/fork)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request
  7. Profit! :white_check_mark:

License

The MIT License (MIT)

Copyright (c) 2013-2020 Diego Siqueira

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.