Skip to content

Telegram Bot that searches definitions for Romanian words using dexonline.ro

License

Notifications You must be signed in to change notification settings

revolter/DexRoBot

Repository files navigation

Dex Bot

Introduction

Telegram Bot that uses dexonline.ro's API to search Romanian words definitions. The bot currently runs as @DexRoBot.

Main functionality

Main screenshot 1Main screenshot 2Main screenshot 3

Toggle links feature

Toggle links screenshot 1Toggle links screenshot 2Toggle
links screenshot 3

Word of the day feature

Word of the day screenshot

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to install Homebrew by running:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installing

Clone the project and install the dependencies by running:

cd /desired/location/path
git clone https://github.com/revolter/DexRoBot.git
cd DexRoBot

curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
sudo apt update
sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
pyenv install 3.9.0
pyenv global 3.9.0

curl -sSL https://install.python-poetry.org | python -
poetry shell
poetry install

cd src
cp config_sample.cfg config.cfg

On Linux, you might need to install the development package of Python by running:

sudo apt install python3-dev

before trying to install the dependencies using pipenv.

Then, edit the file named config.cfg inside the src folder with the correct values and run it using ./main.py --debug.

Use exit to close the virtual environment.

Deploy

You can easily deploy this to a cloud machine using Fabric:

cd /project/location/path

poetry shell

cp fabfile_sample.cfg fabfile.cfg

Then, edit the file named fabfile.cfg inside the root folder with the correct values and run Fabric using:

fab setup
fab deploy

You can also deploy a single file using fab deploy --filename=main.py or fab deploy --filename=pyproject.toml.

About

Telegram Bot that searches definitions for Romanian words using dexonline.ro

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages