2020-05-02 12:46:40 +00:00
|
|
|
# tg
|
2019-02-20 18:15:43 +00:00
|
|
|
|
2020-05-02 12:46:40 +00:00
|
|
|
Console telegram client.
|
|
|
|
|
|
|
|
(!) currently in development
|
|
|
|
|
2020-05-09 06:34:02 +00:00
|
|
|
More documentation and plans for this project at [wiki](https://github.com/paul-nameless/tg/wiki)
|
|
|
|
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
- [tdlib](https://tdlib.github.io/td/build.html?language=Python)
|
|
|
|
For macOS:
|
|
|
|
```sh
|
|
|
|
brew install tdlib
|
|
|
|
```
|
|
|
|
- `python3.8`
|
|
|
|
- `pip3 install python-telegram`
|
|
|
|
- config file at `~/.config/tg/tg.conf`
|
|
|
|
```ini
|
|
|
|
[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
|
2020-05-12 02:27:04 +00:00
|
|
|
record_cmd = ffmpeg -f avfoundation -i ":0" '{file_path}'
|
2020-05-09 06:34:02 +00:00
|
|
|
```
|
|
|
|
Where:
|
|
|
|
- `app_id` and `api_hash` is keys from [telegram](https://core.telegram.org/api/obtaining_api_id)
|
|
|
|
- `phone` your phone number (or login)
|
|
|
|
- `notify_cmd` can be any executable
|
2020-05-12 02:27:04 +00:00
|
|
|
- `record_cmd` command to record audio (example for macOS)
|
2020-05-02 12:46:40 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2020-05-09 06:34:02 +00:00
|
|
|
Clone repository and run it
|
2020-05-02 12:46:40 +00:00
|
|
|
|
2020-05-09 06:34:02 +00:00
|
|
|
```sh
|
|
|
|
git clone git@github.com:paul-nameless/tg.git
|
|
|
|
cd tg
|
|
|
|
PYTHONPATH=. python3 tg/main.py
|
2020-05-02 12:46:40 +00:00
|
|
|
```
|