PitchHut logo
The Telegram Telegram
Print real telegrams using a thermal receipt printer.
Pitch

The Telegram Telegram is a unique bot that connects Telegram messages to thermal receipt printers. With support for custom fonts, emoji rendering, and automatic text wrapping, it turns digital conversations into tangible messages. Ideal for those wanting to create a nostalgic and engaging way to send messages.

Description

This repository features a Telegram bot designed to transform text messages into printed receipts using a thermal receipt printer (ESC/POS). With capabilities including text wrapping, custom font support, and emoji rendering, this innovative solution offers a unique approach to sending physical telegrams.

Key Features

  • Direct Message Printing: Receives messages through Telegram and prints them directly to a networked thermal printer.
  • Emoji Rendering: Utilizes pilmoji to render emojis accurately and elegantly.
  • Text Formatting: Automatically wraps text to fit within the constraints of receipt paper width, along with styled headers and metadata (sender's name and time).
  • User Access Control: Limits usage to predefined Telegram user IDs, ensuring a secure printing environment.

Technical Requirements

  • Hardware: Requires a networked ESC/POS thermal printer (e.g., Epson TM-T88) with a network connection.
  • Software: Needs Python 3.12+ and the uv package for package management and running the bot.

Configuration

The configuration file, brrrzzt_emoji_bot.py, allows customization, including necessary variables such as Telegram Bot API token, allowed user IDs, and printer specifics (IP address and port).

Usage Instructions

To initiate the bot, run the command below:

uv run python brrrzzt_emoji_bot.py

Upon sending a message to the bot on Telegram, the message is processed, formatted, and printed as a receipt, providing a seamless integration of digital communication and physical output.

0 comments

No comments yet.

Sign in to be the first to comment.