Telegram bot that converts images for blind colour people. Tested on Raspberry Pi 2 Model B.:+1:
Choose your favorite GNU/Linux distribution and install these programs:
sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
Telebot is friggin AWESOME!!!:raised_hands:
https://github.com/eternnoir/pyTelegramBotAPI
pip install pyTelegramBotAPI
pip install Pillow
sudo apt-get install python-matplotlib
sudo apt-get install python-scipy
pip install numpy
sudo apt-get install mysql-server python-mysqldb
- 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
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
On mysql_manager.py file set your MySQL credentials:
db_host = "localhost"
db_name = "DALTONIC_BOT"
db_user = "root"
db_password = ""
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.
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