A multi-mode Telegram bot that provides real-time alerts, daily forecasts, and weekly outlooks for specific beaches in Israel.
-
Clone the repository:
git clone https://github.com/yourusername/SurfManager.git cd SurfManager -
Install dependencies:
pip install -r requirements.txt
-
Environment Variables:
- Copy
.env.exampleto.env. - Add your
TELEGRAM_TOKEN(get it from @BotFather). - (Optional) Update
CHANNEL_IDinmain.pyto your own channel for testing.
- Copy
-
Run the script: The bot supports three modes:
python main.py --mode live # Current conditions python main.py --mode daily # Tomorrow's forecast python main.py --mode weekly # 7-day outlook
The bot uses three separate GitHub Action workflows for different reporting schedules:
- Live Check: Runs every 3h (Daylight IL).
- Daily Forecast: Runs at 19:00 UTC.
- Weekly Outlook: Runs Saturdays at 20:00 UTC.
To make it work, add the following secrets to your repo:
TELEGRAM_TOKEN: Your bot token.TELEGRAM_CHAT_ID: Your channel ID.SUPABASE_URL: Your Supabase URL.SUPABASE_KEY: Your Supabase API Key.
- Ashdod: קשתות, השובר, גיל, לידו.
- Palmahim: חוף פלמחים.
- Open-Meteo Marine API - Surf and weather data.
- Supabase - Key-Value store for cooldowns and memory.
- Requests - HTTP library for API calls.
- h2 - HTTP/2 support for Supabase.
- Python-dotenv - Local environment management.