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 project uses Youtube data API's to do youtube tags analysis based on viewCount, comments etc.

Youtube video details analyser Steps to run this project Please set the AuthKey which you can fetch from google developer console and paste it in the

1 Nov 21, 2021
The smart farm is an idea that designing Smart Farm by IoT

The smart farm is an idea that designing Smart Farm by IoT. Using Raspberry Pi 4 detect the data from different sensors(Raindrop sensor and DHT22 sensor), and push the data to Azure IoT central.

Jiage 1 Jan 11, 2022
Reddit bot that uses sentiment analysis

Reddit Bot Project 2: Neural Network Boogaloo Reddit bot that uses sentiment analysis from NLTK.VADER WIP_WIP_WIP_WIP_WIP_WIP Link to test subreddit:

TpK 1 Oct 24, 2021
Photogrammetry Web API

OpenScanCloud Photogrammetry Web API Overview / Outline: The OpenScan Cloud is intended to be a decentralized, open and free photogrammetry web API. T

Thomas 86 Jan 05, 2023
Simple Discord bot for snekbox (sandboxed Python code execution), self-host or use a global instance

snakeboxed Simple Discord bot for snekbox (sandboxed Python code execution), self-host or use a global instance

0 Jun 25, 2022
A battle-tested Django 2.1 project template with configurations for AWS, Heroku, App Engine, and Docker.

For information on how to use this project template, check out the wiki. {{ project_name }} Table of Contents Requirements Local Setup Local Developme

Lionheart Software 64 Jun 15, 2022
Cloudkeeper is “housekeeping for clouds” - find leaky resources, manage quota limits, detect drift and clean up.

Cloudkeeper Housekeeping for Clouds! Table of contents Overview Docker based quick start Cloning this repository Component list Contact License Overvi

Some Engineering 1.2k Jan 03, 2023
Twitter feed of newly published articles in Limnology

limnopapers Code to monitor limnology RSS feeds and tweet new articles. Scope The keywords and journal choices herein aim to focus on limnology (the s

7 Dec 20, 2022
Modified Version Of Media Search bot

Modified Version Of Media Search bot

1 Oct 09, 2021
A Telegram Bot to display Codeforces Contest Ranklist

CFRankListBot A bot that displays the top ranks for a Codeforces contest. Participants' Details All the details of a participant is in the utils/__ini

Code IIEST 5 Dec 25, 2021
Bot Auto Chess.com

Bot Auto Chess.com Is a suggestion for chess moves on the chess.com platform. The available features are: chess suggestions and moves automatically. i

Tn. Ninja 34 Jan 01, 2023
Tesseract Open Source OCR Engine (main repository)

Tesseract OCR About This package contains an OCR engine - libtesseract and a command line program - tesseract. Tesseract 4 adds a new neural net (LSTM

48.3k Jan 05, 2023
HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions 💻🌐💡

aws-iot-shadow-rest-api HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions 💻 🌐 💡 This simple script implements the following aw

AIIIXIII 3 Jun 06, 2022
Auto file forward bot with python

Auto-File-Forward-Bot Auto file forward bot. Without Admin Permission in FROM_CHANNEL Only Give Permission In your Telegram Personal Channel Please fo

Milas 1 Oct 15, 2021
NFT Generator - A NFT Generator created using Python

NFT_Generator v1 An NFT Generator created using Python. This NFT Generation tool

3 Dec 02, 2022
Código para trabalho com o dataset Wine em Python

Um perceptron multicamadas (MLP) é uma rede neural artificial feedforward que gera um conjunto de saídas a partir de um conjunto de entradas. Um MLP é

Hemili Beatriz 1 Jan 08, 2022
Probably Overengineered Unimore Booker

POUB Probably Overengineered Unimore Booker A python-powered, actor-based, telegram-facing, timetable-aware booker for unimore (if you know more adjec

Lorenzo Rossi 3 Feb 20, 2022
Anti-corruption-bot - Anti corruption bot with python

anti-corruption-bot Test API (running via Flask) is currently hosted at https://

Richard Bankole 2 Feb 16, 2022
Fast and small Discord-Toolset.

Mooncord 🌙 Discord server: https://discord.gg/frnpk2rg Fast and small Discord-Toolset. Enjoy? Star this repo ⭐ (Main file in Mooncord/Moon-1.0.1/vers

7ua 9 Dec 11, 2021
Wrapper around the latest Tuenti API

python-tuenti Overview Wrapper around the latest Tuenti API. Installation Install using pip, including any optional packages you want... $ pip install

Juan Riaza 10 Mar 07, 2022