Skip to content

script-0/hcia-rs-prep-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hcia-rs-prep-bot

A Telegram bot for question/answers relatively to HCIA R&S Certification

Lint Code style: black

How to deploy Locally

  • Requirements

    • Python 3.7 or earlier
    • virtualenv
      $ pip3 install virtualenv
    • Initialised Bot with @BotFather
  • Code the repo

    $ git clone git@github.com:script-0/hcia-rs-prep-bot
    cd hcia-rs-prep
  • Configure virtual environment

    $ virtualenv  venv -p python3
    source venv/bin/activate
  • Install librairies

    $ pip3 install -r requirements.txt
  • Define environment variables.

    $ export BOT_SECRET="YOUR_BOT_SECRET"
    $ export MONGO_DB="YOUR_MONGO_DB_URI" # format: "mongodb+srv://USERNAME:PASSWORD@cluster0.0soh0.mongodb.net/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

    updater.start_webhook(
        listen="0.0.0.0", port=PORT, url_path=TOKEN, webhook_url=APP_NAME + TOKEN
    )
  • Oooffs, Run it
    $ python3 bot.py

To DO

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