Skip to content

ElfenB/brother-cube-telegram

Repository files navigation

Brother Cube Telegram Bot

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.

Setup

  1. Create a new bot by messaging @BotFather on Telegram
  2. Follow the instructions to get your bot token
  3. 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

Running

go run main.go

Deployment

For 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
task

To start the service immediately, run:

sudo systemctl start brother-cube-telegram-pi.service

To activate the service on boot, run:

task activate-service

Other

To 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>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages