A simple python3 script based bot for building your own signal channel using signal-cli. It was built for PocketPC.ch.
It depend on signal-cli and uses it as a dbus service. This project is linked to signal-cli-newschannel and serves the later with the list of subscribers.
- First, install dependencies
sudo apt-get update;sudo apt-get install python3 python3-pip
sudo pip install sqlite3 pprint arrow SystemBus GLib
- and then signal-cli
git clone https://github.com/AsamK/signal-cli
and follow the readme of signal-cli or use directly InstallSignalEN.py - Configure signal-cli with your phone number.
- Customize the python script
yj_signalbot_regular.py
according to your needs - Optional: Install the truster script
yj_trustall_subscribers.py
in crontab(crontab -l 2>/dev/null; echo "4 */12 * * * screen -dRS trustall /absolute/path/to/yj_trustall_subscribers.py ") | crontab -
This is done because some subscribers might change their secrets meanhile and then our bot runs into errors. - Run the script, e.g. in a
screen
session:screen -dmS signal-bot python3 yj_signalbot_regular.py
- encrypt the SQlite and enable other db drivers
- clean the code, oop n stuff
- when signal-cli enables TRUST command via dbus, change this from shell command in
yj_trustall_subscribers.py
- parameterisation of the bot
- Use NLP for the chatbot to make it cooler