Skip to content

Simple CLI tool to export files from the telegram channels.

License

Notifications You must be signed in to change notification settings

fatzyyy/teledumper

Repository files navigation

Telegram File Exporter

Telegram File Exporter is a CLI tool for exporting a list of document files from a Telegram channel. It supports listing files, downloading them, and outputting the results to a JSON file.

Features

  • Export document files from a Telegram channel.
  • Optionally download the files to a specified directory.
  • Output the list of files and their metadata to a JSON file.
  • Supports processing a specified number of messages from a channel.

Installation

First, clone the repository:

git clone https://github.com/yourusername/telegram-file-exporter.git
cd telegram-file-exporter
pip install .

Usage

telegram-file-exporter --api-id <your_api_id> --api-hash <your_api_hash> --channel <channel_name_or_id> --mode <list|download> [options]

Arguments

  • --api-id: Your Telegram API ID.
  • --api-hash: Your Telegram API Hash.
  • --channel: The username or ID of the Telegram channel.
  • --mode: The mode of operation. Use list to list files, or download to download files.
  • --output: Boolean flag to output a JSON file (default: True).
  • --max: Maximum number of messages to process from the channel (default: 100).
  • --download-dir: Directory to download files to (default: current directory).

Examples

# List Files in a Channel
telegram-file-exporter --api-id 12345 --api-hash abcdef --channel @mychannel --mode list -m 100

# Download Files from a Channel
telegram-file-exporter --api-id 12345 --api-hash abcdef --channel @mychannel --mode download --download-dir ./downloads -m 100

Requirements

See Pipfile

Credits

This project was created and is maintained by Leonid Akinin [email protected]. If you use or fork this project, please provide proper credit and a link back to the original repository.

License

See License

About

Simple CLI tool to export files from the telegram channels.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages