Code Monkey home page Code Monkey logo

tg-marquee's Introduction

TG Marquee

Simple Flask app in Python that fetches messages from a Telegram channel using Telethon and displays them as a scrolling marquee in the browser.

Installation

Create .env file with your own admin password and secret key:

ADMIN_PASSWORD="[YOUR_SECURE_PASSWORD]"
SECRET_KEY="[YOUR_VERY_SECRET_KEY]"

Install packages:

pip3 install -r requirements.txt

Run the app:

python3 site.py

Configuration

If you are running this app on the server, you would need to copy .env file to that server first.

Open the Admin page http://127.0.0.1:8000/admin and add your Telegram API credentials and Channel ID (your credentials will be stored in a local database). Your admin password is the string that you exported to ADMIN_PASSWORD environment variable from .env file, please keep it secure.

The first time you access Telegram API with your credentials Telegram will ask you to enter a confirmation code and the user_session.session file will be created. Please copy this file to the server where you plan to deploy this app if you don't want to enter the confirmation code again.

Usage

Just open http://127.0.0.1:8000 to see the scrolling marquee, it will update automatically every 60 seconds, fetching all messages from your Telegram channel using API credentials that you configured on Admin page.

tg-marquee's People

Contributors

nagornyi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.