~goorzhel/sota-slack-spotter

SOTA spots for your radio club
a89f8a5f — Antonio Gurgel 28 days ago
0.15.2
729cdcc4 — Antonio Gurgel 28 days ago
rm minor redundancies
9eb27af9 — Antonio Gurgel 29 days ago
Use `SummitCode`

clone

read-only
https://git.sr.ht/~goorzhel/sota-slack-spotter
read/write
git@git.sr.ht:~goorzhel/sota-slack-spotter

You can also use your local clone with git send-email.

#SOTA Slack Spotter

A Slack bot that notifies you when a member of your workspace has been spotted on Summits on the Air. It does this by scraping callsigns from the list of Slack users, fetching spot data from the SOTA API, and messaging a channel whenever a member's callsign appears in a spot.

An example on Slack, with a message reading "N6TNO spotted at W6/CC-063" and thread-replies such as "on 7.0375 MHz (CW) at 17:54:02Z by RBNHOLE ('RBNHOLE at W6YX 14 WPM 25 dB SNR')" (this earned a muscle-emoji reaction from a clubmate).

#Usage

#Environment

#Required
  • SLACK_BOT_TOKEN: Begins with xoxb.
  • SLACK_CHANNEL: The channel where the bot will post spots.
#Optional
  • CACHE_DIR: Where to store cached data. Defaults to /cache.
  • EXTRA_CALLSIGNS: Comma-separated list of callsigns to track in addition to those extracted from Slack.
  • RUST_LOG: Controls logging verbosity. Upstream default is error.

#Fly

SLACK_BOT_TOKEN=<...>
SLACK_CHANNEL=<...>
RUST_LOG=info

flyctl apps create sota-slack-spotter
flyctl secrets set SLACK_BOT_TOKEN=$SLACK_BOT_TOKEN SLACK_CHANNEL=$SLACK_CHANNEL RUST_LOG=$RUST_LOG
#Without Nix

flyctl deploy

#With Nix
nix build .#image

podman load < result
podman tag localhost/sota-slack-spotter:$(git describe --abbrev=0) registry.fly.io/sota-slack-spotter:latest

flyctl tokens create deploy -x 1h | podman login registry.fly.io -u x --password-stdin
podman push registry.fly.io/sota-slack-spotter:latest

flyctl deploy -i registry.fly.io/sota-slack-spotter:latest

#Docker

cat > .env <<EOF
SLACK_BOT_TOKEN=<...>
SLACK_CHANNEL=<...>
EOF
docker-compose up -d
Do not follow this link