All Projects → tvdstaaij → Telegram History Dump

tvdstaaij / Telegram History Dump

Licence: gpl-3.0
Backup Telegram chat logs using telegram-cli

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Telegram History Dump

Sentry Telegram
Plugin for Sentry which allows sending notification via Telegram messenger.
Stars: ✭ 168 (-70.73%)
Mutual labels:  hacktoberfest, telegram
Python Telegram Bot
We have made you a wrapper you can't refuse
Stars: ✭ 17,209 (+2898.08%)
Mutual labels:  hacktoberfest, telegram
Noderssbot
Another Telegram RSS bot but in Node.js Telegram RSS 机器人
Stars: ✭ 212 (-63.07%)
Mutual labels:  hacktoberfest, telegram
Ex gram
Telegram Bot API low level API and framework
Stars: ✭ 103 (-82.06%)
Mutual labels:  hacktoberfest, telegram
Telegram
✈️ Telegram Notifications Channel for Laravel
Stars: ✭ 450 (-21.6%)
Mutual labels:  hacktoberfest, telegram
Botogram
Just focus on your bots.
Stars: ✭ 106 (-81.53%)
Mutual labels:  hacktoberfest, telegram
Ferdi
🧔🏽 Ferdi helps you organize how you use your favourite apps by combining them into one application
Stars: ✭ 4,089 (+612.37%)
Mutual labels:  hacktoberfest, telegram
Tlg joincaptchabot
Telegram Bot to verify if users that join a group, are humans. The Bot send an image captcha for each new user, and kick any of them that can't solve the captcha in a specified time.
Stars: ✭ 226 (-60.63%)
Mutual labels:  hacktoberfest, telegram
Trashemail
A hosted disposable email telegram bot; Extremely privacy friendly; Proudly hosted for community.
Stars: ✭ 408 (-28.92%)
Mutual labels:  hacktoberfest, telegram
Groupbutler
This bot can help you in managing your group with rules, anti-flood, description, custom triggers, and much more!
Stars: ✭ 399 (-30.49%)
Mutual labels:  hacktoberfest, telegram
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (+26.66%)
Mutual labels:  hacktoberfest, telegram
Telethon
Pure Python 3 MTProto API Telegram client library, for bots too!
Stars: ✭ 5,805 (+911.32%)
Mutual labels:  hacktoberfest, telegram
Teloxide
📮 An elegant Telegram bots framework for Rust
Stars: ✭ 604 (+5.23%)
Mutual labels:  hacktoberfest, telegram
Madelineproto
Async PHP client/server API for the telegram MTProto protocol
Stars: ✭ 1,776 (+209.41%)
Mutual labels:  hacktoberfest, telegram
Kotlin Telegram Bot
🤖 A wrapper for the Telegram Bot API written in Kotlin
Stars: ✭ 337 (-41.29%)
Mutual labels:  hacktoberfest, telegram
Werewolf
Werewolf for Telegram
Stars: ✭ 458 (-20.21%)
Mutual labels:  hacktoberfest, telegram
Mtproto
Full-native go implementation of Telegram API
Stars: ✭ 566 (-1.39%)
Mutual labels:  hacktoberfest, telegram
Flask Empty
An empty project skeleton / boilerplate for flask projects. Powered by CookieCutter.
Stars: ✭ 569 (-0.87%)
Mutual labels:  hacktoberfest
Cucumber Ruby
Cucumber for Ruby. It's amazing!
Stars: ✭ 5,090 (+786.76%)
Mutual labels:  hacktoberfest
Introviews Flutter
☀️ A Flutter package for some material design app intro screens with some cool animations.
Stars: ✭ 570 (-0.7%)
Mutual labels:  hacktoberfest

telegram-history-dump

This utility is the successor of telegram-json-backup, written from the ground up in Ruby. It can create backups of your Telegram user and (super)group dialogs using telegram-cli's remote control feature.

Compared to the old project, telegram-history-dump:

  • Has better support for media downloads
  • Supports output formats other than JSON and is extensible with custom formats
  • Supports incremental backup (only new messages are downloaded)
  • Does not depend on unstable Python/Lua bindings within telegram-cli
  • Has a separate YAML formatted configuration file

The default configuration will backup all dialogs to a directory named output, in JSON format, without downloading any media.

Usage

First time setup

  1. Compile telegram-cli, start it once to link your Telegram account
  2. Make sure Ruby 2+ is installed on your system: ruby --version
  3. Optionally configure your backup routine by editing config.yaml

Performing a backup

  1. Start telegram-cli with at least the following options: telegram-cli --json -P 9009
  2. While telegram-cli is running, execute the script: ruby telegram-history-dump.rb

Formatters

History will always be stored in JSON Lines compliant files. However, additional output formats can be produced by uncommenting a few lines in the configuration file.

You can enable one or more of the following formatter modules:

html creates styled, paginated chat logs vieweable with a web browser.

plaintext creates human-readable text files, organized as one file per day.

bare outputs only the actual message texts without any context. It is meant for linguistic / statistical analysis.

pisg creates daily logs compatible with the EnergyMech IRC logging format as input for the PISG chat statistics generator. Also see telegram-pisg.

You can also implement a custom formatter; see formatters/lib/formatter_base.rb for details.

Command line options

Most of the backup configuration is done through the config file, but a few specific options are available as CLI options. None of them are mandatory.

Usage: telegram-history-dump.rb [options]
    -c, --config=cfg.yaml            Path to YAML configuration file
    -k, --kill-tg                    Kill telegram-cli after backup
    -h, --help                       Show help
    -d, --dir=DIR                    Subdirectory for output files
                                     (relative to backup_dir in YAML config)
    -l, --limit=LIMIT                Maximum number of messages to backup
                                     for each target (overrides YAML config)

Notes

Usage notes:

  • It is possible to run telegram-cli on a different machine, e.g. as a daemon on a server. In this case you must pass --accept-any-tcp to telegram-cli and firewall the port appropriately to prevent unwanted exposure. Keep in mind that some options regarding media files will not work in a remote setup.
  • Be careful with decreasing chunk_delay or increasing chunk_size. Telegram seems to rate limit history requests. Going too fast may cause an operation to time out and force the script to skip part of a dump.

Telegram-cli issues known to affect telegram-history-dump:

  • vysheng/tg#947 can cause crashes when dumping channels with more than 100 messages.
  • vysheng/tg#904 can cause crashes when dialogs contain certain media files. If you get this, recompile telegram-cli with the suggested workaround.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].