Skip to content

Unofficial telegram bot for interaction with HEIG-VD GAPS website

License

Notifications You must be signed in to change notification settings

scottwedge/heig-bot

Repository files navigation

HEIG bot

Documentation Status

Telegram bot for check gradle in GAPS (HEIG-VD's platform for gradle). This can also check regularly if a user have new gradle and send message if.

Link

Depends

  • python-telegram-bot
  • beautifulsoup4
  • ics
  • dask-sphinx-theme (for generate documentation)
  • sphinx (for generate documentation)

On Debian buster and earlier

pip3 install python-telegram-bot beautifulsoup4 ics

# if you need generate documentation
apt install python3-sphinx-rtd-theme python3-sphinx

On Debian bullseye/sid

apt install python3-python-telegram-bot python3-bs4
pip3 install ics

# if you need generate documentation
apt install python3-sphinx-rtd-theme python3-sphinx

On Arch Linux

sudo pacman -S python-pip python-telegram-bot python-beautifulsoup4
sudo pip install ics

# if you need generate documentation
sudo pacman -S python-sphinx
sudo pip install sphinx_rtd_theme

Installation

cd /opt/
git clone https://github.com/g-roch/heig-bot.git -b stable
cp heig-bot/config.json.sample heig-bot/config.json
mkdir -p /var/heig-bot/ # set right for script can write

Create bot

You need create a telegram bot with BotFather, and copy the bot key in config.json. (value of bot_token)

Admin/Logs configuration

heig-bot can have admins, you can copy telegram userid (it's a number) to config.json in admin in group group.

heig-bot can send a message when he start, you can copy telegram userid (it's a number) to config.json in log in group group.

You can see your telegram userid when you send /help to the heig-bot. The bot can start without admin, but you need remove "" from admin in group group and log in group in config.json, for empty array.

Start bot manually

cd /opt/heig-bot && ./bot.py

Start bot with Docker

docker build -t heig-bot .
docker run --rm -ti heig-bot

Start bot with docker-compose

docker-compose up

Auto update

add to cron :

*/5 * * * * cd /opt/heig-bot && ./cron.py

Generate docs

Install deps for generate docs (see above).

cd docs
make html

Publish new version

About

Unofficial telegram bot for interaction with HEIG-VD GAPS website

Resources

License

Stars

Watchers

Forks

Packages

No packages published