Bot per la chat live del corso di sistemi operativi UniBO

Overview

cravattaBot

TL;DR: Ho fatto un bot telegram per la chat del corso di sistemi.

Indice


Installazione e prerequisiti

Prerequisiti

Utilizzeremo due librerie di python:

puoi eseguire questo comando per installarle direttamente

sudo python3 -m pip install -r requirements.txt

oppure installarle singolarmente

sudo python3 -m pip install telepot
sudo python3 -m pip install eel

oppure seguire la guida all'installazione dai siti ufficiali telepot eel

Installazione

Basta clonare la repo:

sudo git clone https://github.com/takenX10/cravattaBot

Setup

Configurazione dati

RICORDATI DI SEGUIRE I PASSI SPIEGATI NELL'INSTALLAZIONE

Come prima cosa configurare i dati all'interno del file src/botdata.py, in particolare vanno modificati:

  • token -> il token del bot di telegram da prendere dal botfather
  • chatid -> l'id della chat dove avverrà il redirect dei messaggi da parte del bot
    • -1 per non fare redirect
  • debug_print -> le print di debug
    • True o False
  • autoscroll -> Attiva o disattiva l'autoscroll del sito all'ultimo messaggio

Come creare il bot e prendere il token

Quotando la documentazione ufficiale di telegram

There's a… bot for that. Just talk to BotFather (described below) and follow a few simple steps.

Come trovare il chatid

A meno che l'api di telegram venga modificata questi sono i passaggi:

  1. Dal client di telegram crea un gruppo e aggiungi dentro il bot
  2. Manda un messaggio qualsiasi di prova
  3. Apri https://api.telegram.org/bot /getUpdates dove sostituisci con il token del bot (quindi se il token fosse ABCD:22AABB dovresti aprire https://api.telegram.org/botABCD:22AABB/getUpdates)
  4. All'interno delle info del messaggio dovrebbe essere presente il chat-id del gruppo.

Nel caso di modifiche googla la soluzione, è abbastanza banale in ogni caso.

Esecuzione

Ricordati di installare telepot e eel e di modificare i dati all'interno di botdata.py

python3 src/cravattaBot.py

Possibili miglioramenti

  • Migliorare la gui
  • Aggiungere il color coding per il codice
  • Cambiare telepot con un'altra libreria ancora aggiornata
Owner
Alessandro Frau
Software Developer and Computer Science Student. I am currently studying Computer Science at the University of Bologna. I also play some CTFs with @srdnlen.
Alessandro Frau
This app is providing you to track some online products' prices via GMAIL.

Price Tracking App variables and descriptions of that code is in Turkish language. but we're working on translate them into English. This app is provi

Abdullah Aslan 1 Dec 11, 2021
:evergreen_tree: Python module for communicating with the Taiga API

python-taiga A python wrapper for the Taiga REST API. Documentation: https://python-taiga.readthedocs.io/ Usage: : https://python-taiga.readthedocs.io

Nephila 87 Oct 12, 2022
The aim is to contain multiple models for materials discovery under a common interface

Aviary The aviary contains: - roost, - wren, cgcnn. The aim is to contain multiple models for materials discovery under a common interface Environment

Rhys Goodall 20 Jan 06, 2023
Free python/telegram bot for easy execution and surveillance of crypto trading plans on multiple exchanges.

EazeBot Introduction Have you ever traded cryptocurrencies and lost overview of your planned buys/sells? Have you encountered the experience that your

Marcel Beining 100 Dec 06, 2022
szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❤️

szrose is an all in one group management bot made for managing your group effectively with some advance security tools & Suit For All Your Needs ❤️

szsupunma 93 Jan 07, 2023
Prometheus exporter for CNMC API

CNMC Prometheus exporter It needs a Prometheus Pushgateway Install requirements via pip install -r requirements.txt Export the following environment v

GISCE-TI 1 Oct 20, 2021
Python + AWS Lambda Hands OnPython + AWS Lambda Hands On

Python + AWS Lambda Hands On Python Criada em 1990, por Guido Van Rossum. "Bala de prata" (quase). Muito utilizado em: Automatizações - Selenium, Beau

Marcelo Ortiz de Santana 8 Sep 09, 2022
Download song lyrics and metadata from Genius.com 🎶🎤

LyricsGenius: a Python client for the Genius.com API lyricsgenius provides a simple interface to the song, artist, and lyrics data stored on Genius.co

John W. Miller 738 Jan 04, 2023
Presentation and code files for the talk at PyCon Indonesia

pycon-indonesia Presentation and code files for the talk at PyCon Indonesia. Files used for the PyCon Indonesia presentation. [Directory Includes:] Be

Neeraj Pandey 2 Dec 04, 2021
Telegram bot to provide links of different types of files you send

File To Link Bot - IDN-C-X Telegram bot to provide links of different types of files you send. WHAT CAN THIS BOT DO Is it a nuisance to send huge file

IDNCoderX 3 Oct 26, 2021
Periodically check the manuscript state in the scholar one system and send email when finding a new state.

ScholarOne-manuscript-checker Periodically check the manuscript state in the scholar one system and send email when finding a new state. Parameters ne

2 Aug 18, 2022
SaltConf21: Adding Workflow Approval to Salt

SaltConf21: Adding Workflow Approval to Salt Running To run the example, install Docker and docker-compose and run the following commands: docker-comp

SSYS Sistemas 4 Nov 24, 2021
Previewer for VapourSynth scripts.

Standalone previewer for VapourSynth scripts Fork of Endilll's vapoursynth-preview (not maintained anymore) This program is meant to be paired with a

Irrational Encoding Wizardry 26 Dec 16, 2022
Simple script to extract useful informations from the combo BloodHound + Neo4j

bloodhound-quickwin Simple script to extract useful informations from the combo BloodHound + Neo4j. Can help to choose a target. Prerequisites python3

140 Dec 21, 2022
Temperature Monitoring and Prediction Using a Modified Lambda Architecture

Temperature Monitoring and Prediction Using a Modified Lambda Architecture A more detailed write up can be seen in this paper. Original Lambda Archite

Parsa Yousefi 2 Jun 27, 2022
1 Feb 18, 2022
A collection of discord tools I've made.

Discord A collection of discord tools i've made. What's in here? Basically every discord related project i've worked on can be found here, i'll try an

?? ?? ?? 6 Nov 13, 2021
Mass-unscrobble Last.fm scrobbles based on artist, track title, or time of day of the scrobble.

Unscrobbler This program is designed to mass-unscrobble Last.fm scrobbles based on artist, track title, or time of day of the scrobble. For example, i

Nathan 6 Nov 04, 2022
🤖 Fast and simple bot to transform links from Amazon into a nice post with your referral link in Telegram 🛒

AmazonBot 🤖 Fast and simple bot to transform links from Amazon into a nice post with your referral link in Telegram 🛒 Prerequisites You need Python

Alternative Profit 3 Dec 25, 2022
a simple quant trading bot with CLI interface

shepherd a simple quant trading bot with CLI interface CLI shell command docs coming soon after I brush up the code and add more features :) Minimal R

m00n 0 Jun 06, 2022