Skip to main content

A tool for transferring files through Telegram

Project description

Telegram Transfer

A Telegram file transfer tool based on Telethon, supporting folder upload, download, and synchronization.

Features

  • Folder upload, download, and synchronization
  • Resume broken transfers
  • Sync support
  • Real-time progress display
  • File integrity verification
  • Session management
  • Topic Group support
  • Auto-ignore system files (.DS_Store, pycache, etc.)

Installation

  1. Clone the repository:
git clone https://github.com/ooopus/telegramTransfer.git
cd telegramTransfer
  1. Install dependencies:
pip install -r requirements.txt
  1. Configuration: Create a config.toml file:
[api]
id = ""
hash = ""

[session]
dir = "~/.config/telegramTransfer/sessions"
name = "default"

[transfer]
chunk_size = 2097152
retry_times = 3
timeout = 300
upload_order = "none" # name_asc, name_desc, size_asc, size_desc, none

[logging]
level = "INFO"

[filters]
exclude = [
    ".DS_Store",
    "Thumbs.db",
    ".git/",
    "__pycache__/",
    "*.pyc",
    ".*.swp",
    ".env"
]
include = ["*"]

Get your API ID and Hash from https://my.telegram.org.

Usage

Basic Commands

# Upload folder
python -m telegramTransfer upload /path/to/folder --to username

# Upload to Topic Group
python -m telegramTransfer upload /path/to/folder --to https://t.me/c/2257928502/336

# Download folder
python -m telegramTransfer download /path/to/folder --from username

# Sync folder to cloud
python -m telegramTransfer upload /path/to/folder --to username --sync

# Sync folder to local
python -m telegramTransfer download /path/to/folder --from username --sync

Command Arguments

  • folder: Path to the folder to process
  • --to: Target user/channel, supports the following formats:
  • --from: Source user/channel, supports the same formats as --to
  • --caption: File description template, supports the following variables:
    • {path}: Relative file path
    • {size}: File size
    • {mtime}: File modification time
  • --session: Specify session name
  • --new-session: Force create new session
  • --api-id: Telegram API ID
  • --api-hash: Telegram API Hash
  • --sync: Enable sync mode

Advanced Features

  1. Resume Broken Transfers:

    • Continue from where it left off after interruption
    • File integrity verification
    • Auto-skip uploaded files
    • Auto-handle duplicate files
  2. Topic Group Support:

    • Upload files to specific Topics
    • Auto-handle private channel ID conversion
    • Keep messages in correct Topics
  3. File Filtering:

    • Auto-ignore system and temporary files
    • Custom filter rules
    • Wildcard pattern matching
  4. Session Management:

    • Multi-account support
    • Session persistence
    • Automatic login
    • Two-factor authentication support
  5. File Verification:

    • Auto-verify before and after upload
    • Detect file size inconsistencies
    • Display detailed verification results
    • Auto-handle file conflicts

Notes

  1. First-time use requires login verification
  2. Stable network connection recommended
  3. Large file transfers may be limited by Telegram
  4. Please comply with Telegram's Terms of Service
  5. Special characters in filenames are handled correctly
  6. Sync mode will delete excess files at the destination

License

This project is open-sourced under the GNU General Public License v3 (GPLv3).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telegramtransfer-0.0.0.dev202502201203.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file telegramtransfer-0.0.0.dev202502201203.tar.gz.

File metadata

File hashes

Hashes for telegramtransfer-0.0.0.dev202502201203.tar.gz
Algorithm Hash digest
SHA256 9acf6faf236eb7d1aeaba83e3160362425f945fd279ca678098d7c50a31f73fe
MD5 e6b3fced62b66d5ed4c3d221a46cbf26
BLAKE2b-256 9b8a602a6cc803bf2c867e369cc28703885b0b3df0b34f5362354f061933a7b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for telegramtransfer-0.0.0.dev202502201203.tar.gz:

Publisher: python-publish.yml on ooopus/telegramTransfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file telegramtransfer-0.0.0.dev202502201203-py3-none-any.whl.

File metadata

File hashes

Hashes for telegramtransfer-0.0.0.dev202502201203-py3-none-any.whl
Algorithm Hash digest
SHA256 16d63d9dd4058ff562ab39d179148948f7299ad99c6a75fe0057a564881af728
MD5 c836c0e5c87c24fca026aa6f5991c0c3
BLAKE2b-256 f4a609bd7668a16409e9d8aae09734e20169a4c3924327bf33e429300dd957d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for telegramtransfer-0.0.0.dev202502201203-py3-none-any.whl:

Publisher: python-publish.yml on ooopus/telegramTransfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page