1
0
Fork 0
mirror of https://github.com/EDeev/npr_meteobot.git synced 2026-10-07 20:49:33 +03:00
Школьный Telegram-бот (2022): актировки и прогноз погоды для Норильского промышленного района. aiogram 2
Find a file
2026-10-06 22:16:24 +03:00
.github/workflows Docker-образ бота с Chromium; прогноз: запуск Chrome по API Selenium 4 (executable_path/chrome_options убраны в 4.10) 2026-10-06 22:16:24 +03:00
.dockerignore Docker-образ бота с Chromium; прогноз: запуск Chrome по API Selenium 4 (executable_path/chrome_options убраны в 4.10) 2026-10-06 22:16:24 +03:00
.gitattributes Переводы строк приведены к LF 2026-10-02 23:33:14 +00:00
.gitignore Токен из окружения, база создаётся сама 2026-10-02 23:36:49 +00:00
bot.py Мелкие исправления по ruff: дублирующееся имя обработчика /weather, неиспользуемые переменные 2026-10-02 23:36:49 +00:00
config.py Токен из окружения, база создаётся сама 2026-10-02 23:36:49 +00:00
Dockerfile Docker-образ бота с Chromium; прогноз: запуск Chrome по API Selenium 4 (executable_path/chrome_options убраны в 4.10) 2026-10-06 22:16:24 +03:00
info.py Docker-образ бота с Chromium; прогноз: запуск Chrome по API Selenium 4 (executable_path/chrome_options убраны в 4.10) 2026-10-06 22:16:24 +03:00
README.en.md Docker-образ бота с Chromium; прогноз: запуск Chrome по API Selenium 4 (executable_path/chrome_options убраны в 4.10) 2026-10-06 22:16:24 +03:00
README.md Docker-образ бота с Chromium; прогноз: запуск Chrome по API Selenium 4 (executable_path/chrome_options убраны в 4.10) 2026-10-06 22:16:24 +03:00
requirements.txt requirements.txt и CI (ruff, создание базы) 2026-10-02 23:36:49 +00:00
schema.sql Токен из окружения, база создаётся сама 2026-10-02 23:36:49 +00:00
sql.py Токен из окружения, база создаётся сама 2026-10-02 23:36:49 +00:00

NPR MeteoBot

Русский · English

CI Release

A Telegram bot for schoolchildren in the Norilsk industrial area: it sends class cancellations due to frost and wind ("aktirovka") for the user's shift and district and shows the weather forecast.

Status: school project (2022), completed, archived

Stack: Python 3.10 · aiogram 2 · SQLite · Selenium + BeautifulSoup (city administration site, Gismeteo) · pymorphy2

  • Subscription to cancellations by shift (1 or 2) and district: Norilsk, Talnakh, Oganer, Kayerkan
  • Regular checks of the administration site and broadcasts to subscribers
  • Weather forecast for the day and up to 10 days ahead (Gismeteo data)

Running

pip install -r requirements.txt
BOT_TOKEN=token_from_BotFather python bot.py

The sub.db database is created on first run from schema.sql. Cancellations need Chrome: the administration site is read with Selenium.

Docker: docker run -d -e BOT_TOKEN=token -v meteobot-data:/data ghcr.io/edeev/npr_meteobot (same as git.deev.su/edeev/npr_meteobot). Chromium for the forecast is in the image, sub.db lives in the /data volume.

License

School project (2022). The code is open for study; there is no separate license.

Author

Egor Deev — GitHub · Telegram · egor@deev.space


⭐ If you find this project useful, give it a star on GitHub!

Made with ❤️ — deev.space