Personal Telegram bot that sends a daily digest combining weather and news.
- Weather — today's forecast (temperature range, precipitation, conditions) from Open-Meteo
- Irish Times — top 3 stories from the Irish Times RSS feed, selected and summarized by an LLM
- Meduza — top 3 stories from the Meduza RSS feed, selected and summarized in Russian by an LLM
- Go 1.26+
- A Telegram bot token (from @BotFather)
- The chat ID where the bot should send messages (send a message to your bot, then visit
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates— the chat ID is inresult[].message.chat.id) - An OpenAI API key (from platform.openai.com)
All configuration is done via environment variables or CLI flags. Flags take precedence over environment variables.
| Setting | Env var | Flag | Required | Default |
|---|---|---|---|---|
| Telegram bot token | DIGESTBOT_BOT_TOKEN |
--bot-token |
yes | — |
| Telegram chat ID | DIGESTBOT_CHAT_ID |
--chat-id |
yes | — |
| Latitude | DIGESTBOT_LATITUDE |
--latitude |
yes | — |
| Longitude | DIGESTBOT_LONGITUDE |
--longitude |
yes | — |
| OpenAI API key | DIGESTBOT_OPENAI_API_KEY |
--openai-api-key |
yes | — |
| Timezone | DIGESTBOT_TIMEZONE |
--timezone |
no | Europe/Dublin |
| Segments | DIGESTBOT_SEGMENTS |
--segments |
no | weather,irishtimes,meduza |
Latitude and longitude are used to fetch weather from Open-Meteo. Timezone must be a valid tz database name (e.g. Europe/Dublin, America/New_York).
Segments controls which digest sections are included and in what order. Available segments: weather, irishtimes, meduza.
go build ./cmd/digestbot
DIGESTBOT_BOT_TOKEN=123:ABC \
DIGESTBOT_CHAT_ID=-100123456 \
DIGESTBOT_LATITUDE=53.35 \
DIGESTBOT_LONGITUDE=-6.26 \
DIGESTBOT_OPENAI_API_KEY=sk-... \
./digestbotOr with flags:
./digestbot --bot-token 123:ABC --chat-id -100123456 --latitude 53.35 --longitude -6.26 --openai-api-key sk-...DIGESTBOT_BOT_TOKEN=123:ABC \
DIGESTBOT_CHAT_ID=-100123456 \
DIGESTBOT_LATITUDE=53.35 \
DIGESTBOT_LONGITUDE=-6.26 \
DIGESTBOT_OPENAI_API_KEY=sk-... \
go run ./cmd/digestbotdocker build -t digestbot .
docker run --rm \
-e DIGESTBOT_BOT_TOKEN=123:ABC \
-e DIGESTBOT_CHAT_ID=-100123456 \
-e DIGESTBOT_LATITUDE=53.35 \
-e DIGESTBOT_LONGITUDE=-6.26 \
-e DIGESTBOT_OPENAI_API_KEY=sk-... \
digestbotgo vet ./...
go fmt ./...
go test ./...