An open API service indexing awesome lists of open source software.

https://github.com/brensch/schniffer

Schniff for things.
https://github.com/brensch/schniffer

Last synced: 5 months ago
JSON representation

Schniff for things.

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.).