tg_rss_bot/README.md
Alexey Skobkin 2e44df0bbd
All checks were successful
continuous-integration/drone/push Build is passing
#2 #7 Telegram module (#10)
`telegram` module. Closes #2 #7.

Two service classes:

* `Notifier` class
* `CommandProcessor` class

Two [middlewares](https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/middleware):

* `UserAuthMiddleware`
* `ExceptionHandlerMiddleware`

One exception for usage in the code called by the bot:

* `DisplayableException`

Merge **ONLY** after #9 is merged.

Reviewed-on: #10
Reviewed-by: Miroslavsckaya <miroslavsckaya@noreply.git.skobk.in>
2022-05-30 23:54:26 +03:00

39 lines
933 B
Markdown

# Telegram RSS Bot
[![Build Status](https://ci.skobk.in/api/badges/Miroslavsckaya/tg_rss_bot/status.svg)](https://ci.skobk.in/Miroslavsckaya/tg_rss_bot)
## Setting up virtual environment
To be able to isolate project environment we'll use
[Python's venv](https://docs.python.org/3/library/venv.html).
### Setting up new environment and installing dependencies
```shell
# Create VirtualEnv directory
python -m venv ./.venv
# Loading environment
source .venv/bin/activate
# Installing dependencies
pip install -r requirements.txt
```
### Adding dependencies
```shell
# 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
```shell
export TELEGRAM_TOKEN=xxx
python bot.py
```