Find a file
Alexey Skobkin e1e9ce0055
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
Fix #53. Temporarily (?) sanitizing all HTML tags from RSS item descriptions to avoid non-closed tags being sent to Telegram API.
2023-07-20 01:21:28 +03:00
migrations Database migration (#45) 2022-08-21 23:43:35 +03:00
.dockerignore Docker image (#42) 2022-08-13 19:41:19 +03:00
.drone.yml #36 Removing image tag which couldn't be present at the time of the build. (#44) 2022-08-14 00:11:52 +03:00
.env.dist Docker image (#42) 2022-08-13 19:41:19 +03:00
.gitignore Docker image (#42) 2022-08-13 19:41:19 +03:00
bot.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00
database.py Database migration (#45) 2022-08-21 23:43:35 +03:00
docker-compose.yml Docker image (#42) 2022-08-13 19:41:19 +03:00
Dockerfile Docker image (#42) 2022-08-13 19:41:19 +03:00
exceptions.py #2 #7 Telegram module (#10) 2022-05-30 23:54:26 +03:00
pylama.ini Update manager (#23) 2022-07-08 22:23:12 +03:00
README.md Docker image (#42) 2022-08-13 19:41:19 +03:00
requirements.txt Database migration (#45) 2022-08-21 23:43:35 +03:00
rss.py Fix #47. 2023-06-25 19:37:52 +03:00
telegram.py Fix #53. Temporarily (?) sanitizing all HTML tags from RSS item descriptions to avoid non-closed tags being sent to Telegram API. 2023-07-20 01:21:28 +03:00
update.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00
update_manager.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00

Telegram RSS Bot

Build Status

Setting up virtual environment

To be able to isolate project environment we'll use Python's venv.

Setting up new environment and installing dependencies

# Create VirtualEnv directory
python -m venv ./.venv
# Loading environment
source .venv/bin/activate
# Installing dependencies
pip install -r requirements.txt

Adding dependencies

# Installing new dependency
pip install somedependency
# Rewriting dependency file
pip freeze > requirements.txt

Do not forget to install the latest dependencies before adding new dependencies and rewriting the requirements.txt file. Otherwise old dependencies could be lost.

Running the bot

export RSSBOT_TG_TOKEN=xxx
export RSSBOT_DSN=xxx
python bot.py

Running the update

export RSSBOT_TG_TOKEN=xxx
export RSSBOT_DSN=xxx
python update.py

Running prebuild Docker Image

Running the bot

docker run -e RSSBOT_DSN=yyy RSSBOT_TG_TOKEN=xxx miroslavskaya/tg_rss_bot bot.py

Running update

docker run -e RSSBOT_DSN=yyy RSSBOT_TG_TOKEN=xxx miroslavskaya/tg_rss_bot update.py

Building and running Docker image from source

docker build . -t tg_rss_bot

Running the bot

docker run -e RSSBOT_DSN=yyy RSSBOT_TG_TOKEN=xxx tg_rss_bot bot.py

Running update

docker run -e RSSBOT_DSN=yyy RSSBOT_TG_TOKEN=xxx tg_rss_bot update.py

Using Docker Compose

Running the bot

docker-compose up

Running the update

docker-compose run app update.py