Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/script-0/hcia-rs-prep-bot

A HCIA R&S Certification question/answers Telegram bot
https://github.com/script-0/hcia-rs-prep-bot

hcia-rs hcia-training python-bot quiz-telegram-bot telegram-bot

Last synced: about 4 hours ago
JSON representation

A HCIA R&S Certification question/answers Telegram bot

Awesome Lists containing this project

README

        

# hcia-rs-prep-bot
A Telegram bot for question/answers relatively to HCIA R&S Certification

[![Lint](https://github.com/script-0/hcia-rs-prep-bot/actions/workflows/lint.yml/badge.svg)](https://github.com/script-0/hcia-rs-prep-bot/actions/workflows/lint.yml) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

## How to deploy Locally

- Requirements

- Python 3.7 or earlier
- virtualenv
```bash
$ pip3 install virtualenv
```
- Initialised Bot with [@BotFather](https://t.me/BotFather)
- Code the repo
```bash
$ git clone [email protected]:script-0/hcia-rs-prep-bot
cd hcia-rs-prep
```

- Configure virtual environment

```bash
$ virtualenv venv -p python3
source venv/bin/activate
```

- Install librairies
```bash
$ pip3 install -r requirements.txt
```
- Define environment variables.
```bash
$ export BOT_SECRET="YOUR_BOT_SECRET"
$ export MONGO_DB="YOUR_MONGO_DB_URI" # format: "mongodb+srv://USERNAME:[email protected]/COLLECTION_NAME?retryWrites=true&w=majority"
$ export USER_CODE="USER_CODE_TO_CREATE_QUIZ"
```
- One more step. \
Localise the following bit of code and comment it.\
Tips: look at `main()` in `bot.py`
```python
updater.start_webhook(
listen="0.0.0.0", port=PORT, url_path=TOKEN, webhook_url=APP_NAME + TOKEN
)
```
- Oooffs, Run it
```bash
$ python3 bot.py
```

## To DO

- [x] Implement interaction with user
- [x] User created quizz recording
- [x] Integrate document based database (MongoDB Atlas)
- [x] Think about question with image : ADD illustration to Quiz
- [x] Remove illustration from QUIZ
- [ ] Auto complete feature on typing command
- [ ] More beautiful report
- [ ] More useful How to deploy
- [ ] Code refactoring