Need help with tg-index?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

odysseusmax
154 Stars 168 Forks GNU General Public License v3.0 62 Commits 8 Opened issues

Description

Python web app to index telegram channel and serve its files for download.

Services available

!
?

Need anything else?

Contributors list

No Data

Telegram Index

Python Web App which indexes a telegram channel(or a chat) and serves its files for download.

Open Source Love GPLv3 license

Highlights

  • Index one or more telegram channels/chats.
  • View messages and media files on the browser.
  • Search through the channel/chat.
  • Download media files through browser/download managers.

Demo

Hosted demo site: https://christyroys007-tg-index.zeet.app

Deploy Guide

  • Clone to local machine.
git clone https://github.com/odysseusmax/tg-index.git
cd tg-index
  • Create and activate virtual environment.
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
  • Install dependencies.
pip3 install -U -r requirements.txt
  • Environment Variables.

| Variable Name | Value |------------- | ------------- |

API_ID
(required) | Telegram apiid obtained from https://my.telegram.org/apps. | `APIHASH
(required) | Telegram api_hash obtained from .
|
INDEXSETTINGS
(required) | See the below description.
|
SESSION
STRING
(required) | String obtained by running
$ python3 app/generatesessionstring.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.
|
DEBUG
(optional) | Give some value to set logging level to debug, info by default.
|
BLOCKDOWNLOADS
(optional) | Enable downloads or not. If provided, downloads will be disabled.
|
RESULTS
PER_PAGE` (optional) | Number of results to be returned per page defaults to 20.
  • Setting value for
    INDEX_SETTINGS

This is the general format, change the values of corresponding fields as your requirements. Remember to remove spaces.

{
    "index_all": true,
    "index_private":false,
    "index_group": false,
    "index_channel": true,
    "exclude_chats": [],
    "include_chats": []
}
  • index_all
    - Whether to consider all the chats associated with the telegram account. Value should either be
    true
    or
    false
    .
  • index_private
    - Whether to index private chats. Only considered if
    index_all
    is set to
    true
    . Value should either be
    true
    or
    false
    .
  • index_group
    - Whether to index group chats. Only considered if
    index_all
    is set to
    true
    . Value should either be
    true
    or
    false
    .
  • index_channel
    - Whether to index channels. Only considered if
    index_all
    is set to
    true
    . Value should either be
    true
    or
    false
    .
  • exclude_chats
    - An array/list of chat id's that should be ignored for indexing. Only considered if
    index_all
    is set to
    true
    .
  • include_chats
    - An array/list of chat id's to index. Only considered if
    index_all
    is set to
    false
    .
  • Run app.
python3 -m app

Contributions

Contributions are welcome.

Contact

You can contact me @odysseusmax.

License

Code released under The GNU General Public License.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.