https://github.com/brensch/schniffer
Schniff for things.
https://github.com/brensch/schniffer
Last synced: 5 months ago
JSON representation
Schniff for things.
- Host: GitHub
- URL: https://github.com/brensch/schniffer
- Owner: brensch
- Created: 2025-08-11T03:12:17.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T07:00:37.000Z (10 months ago)
- Last Synced: 2025-08-26T08:38:04.409Z (10 months ago)
- Language: Go
- Size: 67.5 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# schniffer
A Go Discord bot that monitors campground availability, records all activity to DuckDB, and notifies users when sites become available or unavailable.
## Features
- Discord-driven: add/list/remove monitoring requests ("schniffs").
- Pluggable campground providers via a common interface.
- Recreation.gov provider built-in.
- Deduplicated lookups per campground per month every 5 seconds.
- Change detection on campsite availability; notify on available and unavailable transitions.
- DuckDB-backed storage for requests, state, lookups, notifications, and daily stats.
- Daily summary posted to a channel and stored for Grafana.
## Quick start
Environment variables:
- DISCORD_TOKEN: Bot token.
- DB_PATH: Path to SQLite database file (e.g., ./schniffer.sqlite).
- SUMMARY_CHANNEL_ID: Discord channel ID for daily summary messages (optional).
- GUILD_ID: Optional; if provided, slash commands will be registered guild-scoped for faster availability.
Run:
```
# build
go build ./cmd/schniffer
# run
DISCORD_TOKEN=... DB_PATH=./schniffer.sqlite go run ./cmd/schniffer
```
## Commands
- /schniff add provider: campground_id: start_date: end_date:
- /schniff list
- /schniff remove id:
- /schniff stats
Dates are inclusive.
## Notes
- Recreation.gov API is public and queried per-month. We dedupe lookups per campground/month.
- All events are recorded to DuckDB for downstream analytics (Grafana, etc.).