No description
Find a file
2022-01-29 20:03:21 +13:00
cmd/nzcovidbot 1.4 - Telegram support 2022-01-22 12:42:24 +13:00
internal/nzcovidbot Fix 23nd and 24rd 2022-01-29 20:03:21 +13:00
.env.example 1.4 - Telegram support 2022-01-22 12:42:24 +13:00
.gitignore Rework to use API instead of CSVs 2022-01-02 12:19:02 +13:00
.gitlab-ci.yml Remove app 2022-01-23 21:50:41 +13:00
CHANGELOG.md 1.4 - Telegram support 2022-01-22 12:42:24 +13:00
discordexample.png Add example images 2022-01-03 11:49:49 +13:00
go.mod 1.4 - Telegram support 2022-01-22 12:42:24 +13:00
go.sum 1.4 - Telegram support 2022-01-22 12:42:24 +13:00
LICENSE Initial commit 2021-09-01 17:37:22 +12:00
nzcovidbot.service Split based on location 2022-01-03 10:55:54 +13:00
README.md [skip-ci] Add bin build instructions 2022-01-16 16:31:41 +13:00
slackexample.png Add example images 2022-01-03 11:49:49 +13:00

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