Giter Site home page Giter Site logo

tdshell's Introduction

TDShell

An interactive Telegram command line interface utilizing TDLib.

Usage

Running Modes

TDShell can be run in two different ways:

  • Interactive mode: Simply type tdshell with some options.
  • One-shot command mode: Run commands as if they are sub-commands of tdshell.

A Telegram database will be generated in the current working directory. However, you can change its location using the tdshell -d path/to/folder option. To encrypt this database, you will be prompted to enter an encryption key. If you prefer not to set an encryption key, use tdshell -N to set an empty key.

Type help to view available commands, and exit to close TDShell.

Downloading Media Files

This is the primary goal of my development of TDShell:

# Download files in messages with given message IDs
download --chat-id -1001472283207 --ids 6887137168 6887184146

# Download files in messages given post links
download --output-folder ./videos/news/ --links https://t.me/AChannel/6560 https://t.me/BChannel/123

# Download files from message XX to message YY
download --chat-id AChannel --range XX YY
download --chat-id AChannel --range XX,YY
download --chat-id AChannel --range XX --range YY

Viewing Chats or Messages

Use --help to view options for the following commands:

  • chats: A command to list all chats in your account.
  • history: View the history of a chat.
  • chatinfo: Retrieve information about a chat.
  • messagelink: Read post links and print messages.

How to Develop

Windows

Use vcpkg to install dependencies:

./vcpkg.exe install gperf:x64-windows openssl:x64-windows zlib:x64-windows

Place the toolchain file CMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake in the CMake configuration settings of your preferred IDE. Please refer to Using vcpkg with CMake.

Example for VSCode:

{
    "cmake.configureSettings": {
        "CMAKE_TOOLCHAIN_FILE": "C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake"
    }
}

Linux

Ensure that zlib, OpenSSL, and gperf are installed:

sudo apt-get install zlib1g-dev libssl-dev gperf

Then, use CMake to build the project.

tdshell's People

Contributors

altairwei 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.