No description
Find a file
Nameless f804c325d0
Merge pull request #40 from paul-nameless/long-msg
Implement sending long msgs
2020-05-19 18:45:16 +08:00
.github/workflows Black formatting update 2020-05-04 15:24:40 +08:00
tg Merge branch 'master' into long-msg 2020-05-19 18:44:32 +08:00
.gitignore correctly handle situation when there are chats with all deleted msgs 2020-05-03 21:44:54 +03:00
pyproject.toml Format with black 2020-05-04 15:01:24 +08:00
README.md Add record_cmd to README 2020-05-12 10:27:04 +08:00
UNLICENSE Reorganize structure of the project 2019-02-20 19:15:43 +01:00

tg

Console telegram client.

(!) currently in development

More documentation and plans for this project at wiki

Requirements

  • tdlib For macOS:
    brew install tdlib
    
  • python3.8
  • pip3 install python-telegram
  • config file at ~/.config/tg/tg.conf
    [DEFAULT]
    api_id = [api id]
    api_hash = [api hash]
    phone = [phone]
    enc_key = [random key for encrypting your database]
    notify_cmd = /usr/local/bin/terminal-notifier -title "{title}" -subtitle "{subtitle}" -message "{msg}" -appIcon "{icon_path}" -sound default
    record_cmd = ffmpeg -f avfoundation -i ":0" '{file_path}'
    
    Where:
    • app_id and api_hash is keys from telegram
    • phone your phone number (or login)
    • notify_cmd can be any executable
    • record_cmd command to record audio (example for macOS)

Usage

Clone repository and run it

git clone git@github.com:paul-nameless/tg.git
cd tg
PYTHONPATH=. python3 tg/main.py