- python3 and pip3 installed on your machine
- Clone the repository to local machine.
- Install the requirements via command
pip3 install -r requirements/requirements.txt
- Put your telegram api_id and api_hash in
src/ 6BA0 config.py
file. - To generate api_id and api_hash please visit https://my.telegram.org/apps.
- Go to the telegram and start the bot: @stopdrugsbot
- Run the script (
API_ID=123 API_HASH='123456' python3 src/main.py
).
The script will go through the list of telegram channels with russian propaganda provided by @stopdrugsbot and report each of them.
First of all please instal a required dev packages - pip install -r requirements/requirements-dev.txt
Next thing is to setup a pre-commit hooks - pre-commit install
Once the installation is done, all the files that are changed will be formatted automatically (and commit halted if something goes wrong, e.g there is a syntactic error). You can also run the formatting manually:
pre-commit run
# or
pre-commit run --all-files
If for some reason you'll want to turn the hook off temporarily, you can do that with - SKIP=flake8 git commit -m "foo"
.
Or you can uninstall it completely with - pre-commit uninstall
.
To update package versions inside .pre-commit-config.yaml
- pre-commit autoupdate
.
After installing pre-precommit hooks your code will be always looks nice.
To build a docker image:
docker build -t report-the-propaganda .
To run it:
docker run -it --rm \
-e API_ID=*** \
-e API_HASH=**** \
report-the-propaganda