Skip to content

Telegram bot that converts image for blind colour people

License

Notifications You must be signed in to change notification settings

Makeroni/BlindColourBot

Repository files navigation

BlindColourBot

Telegram bot that converts images for blind colour people. Tested on Raspberry Pi 2 Model B.:+1:

Installation process

Choose your favorite GNU/Linux distribution and install these programs:

Install Python utils:

sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk

Install Telebot:

Telebot is friggin AWESOME!!!:raised_hands:

https://github.com/eternnoir/pyTelegramBotAPI

pip install pyTelegramBotAPI

Install Pillow:

pip install Pillow

Install MatPlot Library:

sudo apt-get install python-matplotlib

Install Scipy:

sudo apt-get install python-scipy

Install Numpy >= 1.9.0:

pip install numpy

Install MySQL and Python utillities for MySQL:

sudo apt-get install mysql-server python-mysqldb

Import MySQL Database:

  • Create MySQL database in your MySQL database engine:
CREATE DATABASE IF NOT EXISTS DALTONIC_BOT;
  • Import the MySQL dump file:
mysql -u <username> -p DALTONIC_BOT < DALTONIC_BOT_2016-10-22.sql

Temporal folder creation

Inside telegram_daltonic_bot.py file there is a variable called SAVE_PATH, you can set your own path to save the images created. Inside this path create two folders incoming_images and outcoming_images.

mkdir SAVE_PATH/incoming_images
mkdir SAVE_PATH/outcoming_images

MySQL credentials

On mysql_manager.py file set your MySQL credentials:

db_host = "localhost"
db_name = "DALTONIC_BOT"
db_user = "root"
db_password = ""

Usage

Command list for @BlindColourBot:

  • /start : Starts BlindColourBot
  • /help : Help for BlindColourBot
  • /stop : Stop BlindColourBot
  • /setmydaltonism : Set your daltonism configuration
  • /resetmydaltonism : Reset your configuration

This bot also uses Daltonize project. Big thank you for this wonderful tool:heartbeat::

https://github.com/joergdietrich/daltonize

Add this bot to your conversation at @BlindColourBot.

Bonus

Add this line to your crontab to track if @BlindColourBot is running. The script check every two minutes if the bot is running:

*/2 *   * * *   root    /bin/sh /path/to/watchdog_bots.sh /path/to/telegram_daltonic_bot.py > /dev/null

Make sure to set execution permissions to the script:

chmod +x /path/to/watchdog_bots.sh

About

Telegram bot that converts image for blind colour people

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages