A simple Telegram bot built with Go. It interacts with Brother printers to print messages sent by users.
The interaction with the printer is enabled by the ptouch-print tool by Dominic Radermacher.
- https://git.familie-radermacher.ch/linux/ptouch-print.git
- https://dominic.familie-radermacher.ch/projekte/ptouch-print
- Create a new bot by messaging @BotFather on Telegram
- Follow the instructions to get your bot token
- Set the environment variable:
export TELEGRAM_BOT_TOKEN="your_actual_bot_token_here"Or create a .env file (copy from .env.example) and load it before running
go run main.goFor easier management, you can use taskfile to run tasks. To install it, follow the instructions in their documentation.
If you don't want to use it, you can run the tasks manually.
The Taskfile.yaml defines tasks for building, uploading, and managing the service on the Raspberry Pi.
To configure the settings for your host, modify the vars on top of the Taskfile.yaml.
# See available tasks
taskTo start the service immediately, run:
sudo systemctl start brother-cube-telegram-pi.serviceTo activate the service on boot, run:
task activate-serviceTo use custom fonts, simply install them on the system. On RaspberryPi-OS, this can be done by copying the *.ttf files in the fonts folder:
cd fonts
sudo mv <your-font-name>/*.ttf /usr/share/fonts/truetype/<your-font-name>