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
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Clone repository.
|
|
|
|
Run this command.
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run -i -t --rm \
|
|
|
|
-v /tmp/docker-python-telegram/:/tmp/ \
|
|
|
|
-e API_ID=[id]
|
|
|
|
-e API_HASH=[hash]
|
|
|
|
-e PHONE=[phone] \
|
|
|
|
-e PYTHONPATH=/app -v $PWD:/app \
|
|
|
|
akhmetov/python-telegram python3 /app/tg/main.py
|
|
|
|
```
|
|
|
|
|
|
|
|
Where:
|
|
|
|
|
|
|
|
- `APP_ID` and `API_HASH` is keys from [telegram](https://core.telegram.org/api/obtaining_api_id)
|
|
|
|
- `PHONE` your phone number (or login)
|
|
|
|
|
|
|
|
If you don't want to run it using docker, install `tdlib` and `python-telegram`
|
|
|
|
|
|
|
|
For example, macOS:
|
|
|
|
|
|
|
|
```
|
|
|
|
brew install tdlib
|
|
|
|
pip3 install python-telegram
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Links
|
|
|
|
|
|
|
|
Usefull links to help develop this project.
|
|
|
|
|
2020-05-06 03:13:16 +00:00
|
|
|
- tdlib python wrapper: https://github.com/alexander-akhmetov/python-telegram
|
|
|
|
- tdlib official repo: https://github.com/tdlib/td/tree/master/example#python
|
|
|
|
- Build tdlib instructions: https://tdlib.github.io/td/build.html?language=Python
|