From 927561bad5e7237aa1625de0bc7ef3aaed16a255 Mon Sep 17 00:00:00 2001 From: Christy Roys Date: Mon, 10 Aug 2020 07:23:19 +0000 Subject: [PATCH] Update README.md --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f99f1c..cd0bffc 100644 --- a/README.md +++ b/README.md @@ -1 +1,57 @@ -# tg-index \ No newline at end of file +# 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** +| `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. + +`$ python3 -m app` + +## Contributions + +Contributions are welcome. + +## Contact + +You can contact me [@odysseusmax](https://tx.me/odysseusmax). + +## License +Code released under [The GNU General Public License](LICENSE).