No description
Find a file
2020-05-22 11:59:39 +08:00
.github/workflows add some mypy flags 2020-05-20 09:19:51 +03:00
tg Rewrite config file 2020-05-22 11:59:39 +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