TelegramIndex-Fork/README.md

65 lines
1.7 KiB
Markdown
Raw Normal View History

2020-08-10 09:23:19 +02:00
# Telegram Index
> Python Web App which indexes a telegram channel(or a chat) and serves its files for download.
## Overview
* This app indexes all the available messages.
* If the message is a media message, you can download the file.
* You can search for specific terms too.
## Deploy Guide
* Clone to local machine.
```bash
$ git clone https://github.com/odysseusmax/tg-index.git
$ cd tg-index
```
* Create and activate virtual environment.
```bash
$ pip3 install virtualenv
$ virtualenv venv
$ source venv/bin/activate
```
* Install dependencies.
```bash
$ pip3 install -U -r requirements.txt
```
* Environment Variables.
| **Variable Name** | **Value**
2020-08-10 09:24:30 +02:00
|------------- | -------------
2020-08-10 09:23:19 +02:00
| `API_ID` (required) | Telegram api_id obtained from https://my.telegram.org/apps.
| `API_HASH` (required) | Telegram api_hash obtained from https://my.telegram.org/apps.
| `CHAT_ID` (required) | Id of the telegram channel (or chat) to be indexed.
| `SESSION_STRING` (required) | String obtained by running `$ python3 app/generate_session_string.py`. (Login with the telegram account which is a participant of the given channel (or chat).
| `PORT` (optional) | Port on which app should listen to, defaults to 8080.
| `HOST` (optional) | Host name on which app should listen to, defaults to 0.0.0.0.
* Run app.
2020-08-10 09:25:42 +02:00
```bash
$ python3 -m app
```
2020-08-10 09:23:19 +02:00
2020-08-10 09:44:31 +02:00
* Deploy to heroku.
2020-08-10 09:58:49 +02:00
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/odysseusmax/tg-index/tree/master)
2020-08-10 09:44:31 +02:00
2020-08-10 09:23:19 +02:00
## Contributions
Contributions are welcome.
## Contact
You can contact me [@odysseusmax](https://tx.me/odysseusmax).
## License
Code released under [The GNU General Public License](LICENSE).