This project is the combination of two simple Python 3 scripts that I originally wrote for myself, and then I decided to make public so that everyone could make use of and improve them.
Any contribution to the project is highly appreciated and welcome, however, please try to follow the PEP8 specification in order to keep the code clean, tidy and consistent.
The two components of tg-channel-watcher (which are also the two original separate projects) are:
-
forwarder: checks all the messages sent in a list of channels and forwards (to yourself or to someone else) the ones matching a set of regexes,
-
downloader: downloads all the media (images and/or documents) sent in a list of channels, except for the formats specified in a blacklist.
After you have cloned the repository, run the command pip3 install -Ur requirements.txt
to install all the required dependencies.
You may want to use a virtual environment for that.
Before running the script, create a configuration file with your settings using
the file example.ini
as reference.
Then, run the script with the configuration file as first parameter, like that
./main.py config.ini
, or without any parameter to use the config.ini
file
in the same directory.