https://github.com/samy1108/telegram-kiosk-display
Telegram-driven kiosk display that captures chat messages and serves them as a JSON feed. Perfect for web frontends. 🚀📦
https://github.com/samy1108/telegram-kiosk-display
asyncio better-profanity digital-signage docker dotenv flask flask-cors json logging message-rotation python real-time rest-api telethon webapp
Last synced: 4 months ago
JSON representation
Telegram-driven kiosk display that captures chat messages and serves them as a JSON feed. Perfect for web frontends. 🚀📦
- Host: GitHub
- URL: https://github.com/samy1108/telegram-kiosk-display
- Owner: samy1108
- License: mit
- Created: 2025-06-22T12:59:39.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-06-22T15:02:48.000Z (4 months ago)
- Last Synced: 2025-06-22T16:20:20.554Z (4 months ago)
- Topics: asyncio, better-profanity, digital-signage, docker, dotenv, flask, flask-cors, json, logging, message-rotation, python, real-time, rest-api, telethon, webapp
- Language: Python
- Homepage: https://samy1108.github.io
- Size: 207 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Real-time Telegram Chat Message Rotator for Digital Signage

## Overview
**Telegram Kiosk Display** is a real-time chat message rotator designed for digital signage. This application leverages the power of Flask and Telethon to provide a seamless experience for displaying Telegram messages. Whether you want to showcase updates, announcements, or general chat messages, this tool makes it easy to engage your audience.
## Features
- **Real-time message rotation**: Instantly display new messages as they arrive.
- **Customizable settings**: Adjust display options to fit your digital signage needs.
- **Docker support**: Easily deploy the application using Docker for a consistent environment.
- **Flask framework**: Built on Flask, ensuring a robust web application.
- **Telethon integration**: Utilize the Telethon library for efficient interaction with the Telegram API.
- **Logging**: Monitor application performance and issues with built-in logging features.
- **Environment configuration**: Use `.env` files to manage environment variables securely.## Installation
To get started with the Telegram Kiosk Display, follow these steps:
1. **Clone the repository**:
```bash
git clone https://github.com/samy1108/telegram-kiosk-display.git
cd telegram-kiosk-display
```2. **Set up the environment**:
Create a `.env` file in the root directory and add your Telegram API credentials. You can obtain these credentials by registering your application on the [Telegram API](https://my.telegram.org/apps).
Example `.env` file:
```
TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
TELEGRAM_CHAT_ID=your_chat_id
```3. **Install dependencies**:
Use pip to install the required packages:
```bash
pip install -r requirements.txt
```4. **Run the application**:
You can run the application using Flask:
```bash
flask run
```Alternatively, if you prefer using Docker, you can build and run the container:
```bash
docker build -t telegram-kiosk-display .
docker run -p 5000:5000 telegram-kiosk-display
```## Usage
Once the application is running, you can access it in your web browser at `http://localhost:5000`. The interface will display the messages from the specified Telegram chat in real-time.
### Customization
You can customize various aspects of the display, such as:
- **Message duration**: Set how long each message appears on the screen.
- **Font size**: Adjust the font size for better visibility.
- **Background color**: Change the background color to match your branding.Modify these settings in the configuration file or through the web interface.
## Topics Covered
This project covers a variety of topics relevant to modern web applications and digital signage:
- **asyncio**: Asynchronous programming for better performance.
- **better-profanity**: Filter out inappropriate language from messages.
- **digital-signage**: Tailored for use in digital signage applications.
- **docker**: Containerization for easy deployment.
- **dotenv**: Manage environment variables securely.
- **flask**: The web framework used to build the application.
- **flask-cors**: Enable Cross-Origin Resource Sharing for the API.
- **json**: Handle data interchange format.
- **logging**: Built-in logging for monitoring.
- **message-rotation**: The core functionality of the application.
- **python**: The programming language used for development.
- **real-time**: Instant updates to displayed messages.
- **rest-api**: Interact with the application programmatically.
- **telethon**: Library for interacting with the Telegram API.
- **webapp**: The overall structure of the application.## API Endpoints
The application provides several RESTful API endpoints:
- `GET /messages`: Retrieve the current messages being displayed.
- `POST /messages`: Add a new message to the display queue.
- `DELETE /messages/{id}`: Remove a message from the display.### Example Usage
To add a new message, you can use the following curl command:
```bash
curl -X POST http://localhost:5000/messages -H "Content-Type: application/json" -d '{"message": "Hello, World!"}'
```## Deployment
### Docker Deployment
To deploy the application using Docker, follow these steps:
1. Build the Docker image:
```bash
docker build -t telegram-kiosk-display .
```2. Run the container:
```bash
docker run -d -p 5000:5000 --env-file .env telegram-kiosk-display
```This will run the application in a detached mode, making it accessible at `http://localhost:5000`.
### Non-Docker Deployment
If you prefer not to use Docker, ensure you have Python and Flask installed on your machine. Follow the installation steps mentioned above, and run the application directly using Flask.
## Contributing
Contributions are welcome! If you want to improve the Telegram Kiosk Display, please follow these steps:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature/YourFeature`).
3. Make your changes and commit them (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature/YourFeature`).
5. Open a pull request.Please ensure that your code follows the existing style and includes tests where applicable.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Releases
To download the latest version of the Telegram Kiosk Display, visit the [Releases section](https://github.com/samy1108/telegram-kiosk-display/releases). Here, you can find the latest updates and download the necessary files to run the application.
## Support
If you encounter any issues or have questions, please open an issue in the repository. We appreciate your feedback and will do our best to assist you.
For more information, check the [Releases section](https://github.com/samy1108/telegram-kiosk-display/releases) for updates.
## Acknowledgments
Thanks to the developers of Flask and Telethon for their excellent frameworks. This project would not be possible without their contributions to the open-source community.

## Additional Resources
- [Flask Documentation](https://flask.palletsprojects.com/)
- [Telethon Documentation](https://docs.telethon.dev/)
- [Docker Documentation](https://docs.docker.com/)For more information and updates, please visit the [Releases section](https://github.com/samy1108/telegram-kiosk-display/releases).