DEPRECATED - Pull data from MoH API and parses new locations into Telegram Channel + Slack / Discord webhooks.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Daniel Mason 2ddd06cea4
Fix 23nd and 24rd
1 year ago
cmd/nzcovidbot 1.4 - Telegram support 1 year ago
internal/nzcovidbot Fix 23nd and 24rd 1 year ago
.env.example 1.4 - Telegram support 1 year ago
.gitignore Rework to use API instead of CSVs 1 year ago
.gitlab-ci.yml Remove app 1 year ago
CHANGELOG.md 1.4 - Telegram support 1 year ago
LICENSE Initial commit 1 year ago
README.md [skip-ci] Add bin build instructions 1 year ago
discordexample.png Add example images 1 year ago
go.mod 1.4 - Telegram support 1 year ago
go.sum 1.4 - Telegram support 1 year ago
nzcovidbot.service Split based on location 1 year ago
slackexample.png Add example images 1 year ago

README.md

NZCovidBot

Pulls data from Ministry of Health API and parse into Discord and Slack webhooks.

About

After the twitterbot @nzcovidlocs shut down, I decided to try a different approach, instead of scraping MoH's website, we originally parsed the raw CSV data. Since then the NZ Ministry of Health have released an API containing this data now. We are now using this https://api.integration.covid19.health.nz/locations/v1/current-locations-of-interest

Config

Copy .env.example to .env and fill in the webhook URLs

Prod/Binary build (linux x86_64)

Download the latest job artifact from CI/CD > Job page
create .env from .env.example in same directory as binary
Run binary ./nzcovidbot

Run locally

    go run cmd/nzcovidbot/*.go

Build

    go build -o nzcovidbot cmd/nzcovidbot/*.go
    sudo cp nzcovidbot.service /etc/systemd/system/nzcovidbot.service
    # Update user + location of repo in systemd file
    sudo systemctl daemon-reload && systemctl enable --now nzcovidbot.service

Screenshots

Discord

DiscordExample

Slack

SlackExample