A tool for exporting Telegram group chats into static websites, preserving chat history like mailing list archives.

Overview

favicon

tg-archive is a tool for exporting Telegram group chats into static websites, preserving chat history like mailing list archives.

Preview

The @fossunited Telegram group archive.

image

How it works

tg-archive uses the Telethon Telegram API client to periodically sync messages from a group to a local SQLite database file, downloading only new messages since the last sync. It can then generate a static archive website of messages which can be published anywhere.

Features

  • Periodically sync Telegram group messages to a local DB.
  • Download user avatars locally.
  • Download and embed media (files, documents, photos).
  • Renders poll results.
  • Use emoji alternatives in place of stickers.
  • Single file Jinja HTML template for generating the static site.
  • Year / Month / Day indexes with deep linking across pages.
  • "In reply to" on replies with links to parent messages across pages.
  • RSS / Atom feed of recent messages.

Install

  • Get Telegram API credentials. Normal user account API and not the Bot API.
  • Install with pip3 install tg-archive (tested with Python 3.8.6).

Usage

  1. tg-archive --new --path=mysite (creates a new site. cd into mysite and edit config.yaml).
  2. tg-archive --sync (syncs data into data.sqlite). Note: First time connection will prompt for your phone number + a Telegram auth code sent to the app. On successful auth, a session.session file is created. DO NOT SHARE this session file publicly as it contains the API autorization for your account.
  3. tg-archive --build (builds the static site into the site directory, which can be published)

Customization

Edit the generated template.html and static assets in the ./static directory to customize the site.

Note

  • The sync can be stopped (Ctrl+C) any time to be resumed later.
  • Setup a cron job to periodically sync messages and re-publish the archive.
  • Downloading large media files and long message history from large groups continuously may run into Telegram API's rate limits. Watch the debug output.

Licensed under the MIT license.

Owner
Kailash Nadh
CTO @zerodhatech | Volunteer @fossunited
Kailash Nadh
Takes upcoming items from a Google Calendar and posts them to Slack.

Google Calendar to Slack by Jason Snell - [email protected] This Python s

6 Aug 21, 2022
A telegram bot to download mega.nz links. (made with pyrogram).

Mega Link Downloader Bot This is a telegram bot to download mega.nz links and return them as files/videos - Made by a 100% noob! (When I mean noob I r

171 Dec 27, 2022
The AWS Lambda Serverless Blind XSS App

Ass The AWS Lambda Serverless Blind XSS App 利用VPS配置XSS平台太麻烦了,如果利用AWS的Lambda那不就是一个域名的事情么?剩下的环境配置、HTTPS证书、隐私性、VPS续费都不用管了, 所以根据xless重写了Lambda平台的XSS,利用sla

cocokey 2 Dec 27, 2021
🎥 Stream your favorite movie from the terminal!

Stream-Cli stream-cli is a Python scrapping CLI that combine scrapy and webtorrent in one command for streaming movies from your terminal. Installatio

R E D O N E 379 Dec 24, 2022
Powerful Telegram userbot to turn your PROFILE PICTURE & LAST NAME into a real time clock & to change your BIO automatically.

DATE_TIME_USERBOT-TeLeTiPs Powerful Telegram userbot to turn your PROFILE PICTURE & LAST NAME into a real time clock & to change your BIO automaticall

53 Jan 05, 2023
Discord RPC for Notion written in Python

Discord RPC for Notion This is a program that allows you to add your Notion workspace activities to your Discord profile. This project is currently un

Thuliumitation 1 Feb 10, 2022
TON Miner from TON-Pool.com

TON-Pool Miner Miner from TON-Pool.com

21 Nov 18, 2022
A Discord bot themed around the Swedish heavy metal band Sabaton! (Python)

A Discord bot themed around the Swedish heavy metal band Sabaton! (Python)

Evan Lundberg 1 Nov 29, 2021
Simple Craigslist wrapper

python-craigslist A simple Craigslist wrapper. License: MIT-Zero. Disclaimer I don't work for or have any affiliation with Craigslist. This module was

Julio M. Alegria 370 Dec 22, 2022
A bot i made for a dead com server lol it gets updated daily etc

6ix-Bot-Source A bot i made for a dead com server lol it gets updated daily etc For The UserAgent CMD https://developers.whatismybrowser.com/ thats a

Swiper 9 Mar 10, 2022
Autodrive is designed to make it as easy as possible to interact with the Google Drive and Sheets APIs via Python

Autodrive Autodrive is designed to make it as easy as possible to interact with the Google Drive and Sheets APIs via Python. It is especially designed

Chris Larabee 1 Oct 02, 2021
C Y B Ξ R UserBot is a project that simplifies the use of Telegram.

C Y B Ξ R USΞRBOT 🇦🇿 C Y B Ξ R UserBot is a project that simplifies the use of Telegram. All rights reserved. Automatic Setup Android: open Termux p

FVREED 4 Dec 07, 2022
Picot - A discord bot made to fetch images from Pexels and unsplash API and provide raw images directly in channels

Picot A discord bot made to fetch images from Pexels and unsplash API and provid

Ayush Chandwani 5 Jan 12, 2022
Slash util - A simple script to add application command support to discord.py v2.0

slash_util is a simple wrapper around slash commands for discord.py This is writ

Maya 28 Nov 16, 2022
Zipper-s-Father - A simple telegram bot that takes a list of files sent by the user and returns them zipped

ZIP files telegram bot A simple telegram bot that takes a list of files sent by

Dr.Caduceus 1 Jan 29, 2022
Python binding for Terraform.

Python libterraform Python binding for Terraform. Installation $ pip install libterraform NOTE Please install version 0.3.1 or above, which solves the

Prodesire 28 Dec 29, 2022
Automate coin farming for dankmemer. Unlimited accounts at once. Uses a proxy

dankmemer-farm Simple script to farm Dankmemer coins with multiple accounts at once. Requires: Proxies, Discord Tokens Disclaimer I don't take respons

Scobra 12 Dec 20, 2022
LEC_Ditto is a bot that tracks the follows and unfollows of Twitter accounts

✨ LEC_Ditto ✨ I'm Ditto, and I'm a bot 🤖 . Getting Started | Installation | Usage Getting Started LEC_Ditto is a bot that tracks the follows and unfo

2 Mar 30, 2022
fbchat - Facebook Messenger for Python

A powerful and efficient library to interact with Facebook's Messenger, using just your email and password.

1.1k Dec 23, 2022
Yes, it's true :revolving_hearts: This repository has 301 stars.

Yes, it's true! Inspired by a similar repository from @RealPeha, but implemented using a webhook on AWS Lambda and API Gateway, so it's serv

510 Dec 28, 2022